Response.ContentType = "application/x-msdownload";
Response.AddHeader("Content-Disposition", "attachment;filename="+attachment1.AttFileName);attachment1.AttFileName如果是中文的名称会出现乱码,怎样解决啊?
Response.AddHeader("Content-Disposition", "attachment;filename="+attachment1.AttFileName);attachment1.AttFileName如果是中文的名称会出现乱码,怎样解决啊?
这样的,已经设置过了,还是不行。
试一下
我是读数据流的是这样操作的
string fileName = HttpUtility.UrlEncode(attachment1.AttFileName,System.Text.Encoding.UTF8);