解决Response.AddHeader中文乱码问题
1 string filename = HttpUtility.UrlEncode(Encoding.UTF8.GetBytes("培训班自然情况表")); 2 Response.AddHeader("Content-Disposition", string.Format("attachment; filename={0}.doc", filename + System.DateTime.Now.ToString("yyyymmddhhmmssfff "))); 3 Response.Charset = "UTF-8"; 4 Response.ContentEncoding = System.Text.Encoding.GetEncoding("UTF-8"); 5 Response.ContentType = "application/ms-word"; 6 Response.BinaryWrite(ms.ToArray());