文件下载乱码
string downfile = filename;
if (Request.UserAgent.ToLower().IndexOf("msie") > -1)
{
downfile = HttpUtility.UrlPathEncode(filename);
}
if (Request.UserAgent.ToLower().IndexOf("firefox") > -1)
{
Response.AddHeader("Content-Disposition", "attachment;filename=\"" + downfile + "\"");
}
else
{
Response.AddHeader("Content-Disposition", "attachment;filename=" + downfile);
}
Response.ContentEncoding = System.Text.Encoding.UTF8;
小川~

浙公网安备 33010602011771号