欢迎加入站点基地设计开发交流群:30720409
详细内容
下载保存文件对话框乱码解决方法
发布日期:2010-01-26     点击:4827     字体:[ ]
1.使用Server.UrlEncode

此时web.config必须配置<globalization   requestEncoding="utf-8"     responseEncoding="utf-8"/>      
2. 所以不要用Server.UrlEncode,换HttpUtility.UrlEncode
string s=HttpUtility.UrlEncode(System.Text.UTF8Encoding.UTF8.GetBytes("中文"));
Response.AppendHeader("Content-Disposition", "attachment; filename=" + s);   此时,web.config里utf-8或gb2312都可.

用户评论
昵称 
内容  *
验证码   
   
相关文章 更多...  
Copyright © 2010 zdbase.com All Rights Reserved. 苏ICP备15039389号 可人软件设计