更新时间:2022-12-26 19:19:25
<asp:Button runat="server" ID="btn1" OnClick="btn1_Click" Text="DownLoad Multiple Files" />
<asp:Repeater runat="server" ID="rptr">
<ItemTemplate>
<iframe src="<%#Container.DataItem%>"></iframe>
</ItemTemplate>
</asp:Repeater>
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btn1_Click(object sender, EventArgs e)
{
List<string> files = new List<string>();
files.Add("data1.zip");
files.Add("data2.zip");
files.Add("data3.zip");
files.Add("data4.zip");
rptr.DataSource = files;
rptr.DataBind();
}
单击,您需要获取所选文件,将其压缩并推送到客户端.
http://***.com/questions/2670263/asp-net-download- all-files-as-zip [ ^ ]
At the click, you need to get the selected files, zip them, and push to client.
http://***.com/questions/2670263/asp-net-download-all-files-as-zip[^]