现在的位置: 首页 > 综合 > 正文

使用UpdatePanel 局部刷新出现中文乱码的解决方法!!

2012年04月14日 ⁄ 综合 ⁄ 共 614字 ⁄ 字号 评论关闭

第一种:修改配置文件web.config,加入如下内容:

<globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" culture="zh-CN"/>
就不会出现乱码了。

第二种:如果在配置文件web.config中的<configuration>节点下 已经配置了<globalization fileEncoding="gb2312" requestEncoding="gb2312" responseEncoding="gb2312" /> 则需要将如下代码加入到<configuration>下指定某一页面的编码方式,即可解决。
<location path="OutBoxSendGroup.aspx">
      <system.web>
        <globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" culture="zh-CN"/>
      </system.web>
    </location>

总之将当前页的编码方式修改为utf-8 就行了,

肯定还有其他的方法,在弄下。

 

转自:http://hi.baidu.com/hmilymajuan/blog/item/1ccf88d68480f5d5a044dfc0.html

抱歉!评论已关闭.