天天看點

擴充gridview的導出excel功能亂碼問題的解決

擴充gridview的導出excel功能亂碼問題的解決

 string fileName = HttpUtility.UrlEncode(ExcelFileName+".xls", Encoding.GetEncoding("GB2312"));

 HttpContext.Current.Response.AddHeader("content-disposition",

 "attachment;filename=" + fileName);