asp.net 下载文件
protected void btnExcelDownload_Click(object sender, EventArgs e) { Response.ContentType = "application/x-zip-compressed"; Response.AddHeader("Content-Disposition", "attachment;filename=InstallRecord.zip"); string filename = Server.MapPath("../ExcelFiles/InstallRecordTemplate.zip"); Response.TransmitFile(filename); }
- 上一篇 »Asp.Net 之 下载文件的常用方式
- 下一篇 »Asp.net 实现选择文件批量下载