时间:2021-07-01 10:21:17 帮助过:24人阅读
if (Request.UserAgent.ToLower().IndexOf("msie") > -1)
{
downloadfilename = HttpUtility.UrlPathEncode(downloadfilename);
}
if (Request.UserAgent.ToLower().IndexOf("firefox") > -1)
{
Response.AddHeader("Content-Disposition", "attachment;filename=\"" + downloadfilename + "\"");
}
else
{
Response.AddHeader("Content-Disposition", "attachment;filename=" + downloadfilename);
}