您的位置:首页 > 编程语言 > ASP

asp.net 下载文件

2016-06-06 17:12 567 查看
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);
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: