zoukankan      html  css  js  c++  java
  • asp.net给单独页面设置编码

    //asp.net
    有时我们已经在配置文件中将整个站点的编码设置为gb2312,但某个页面却需要使用utf-8,这时我们可以在配置文件configuration节下新增location节点: 
    程序代码
    <location path="Test.aspx">
       <system.web>
         <globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" culture="en"/>
       </system.web>
    </location>
    如果是要将某个页面单独设置为gb2312则为:
     程序代码<location path="Test.aspx">
       <system.web>
         <globalization fileEncoding="gb2312" requestEncoding="gb2312" responseEncoding="gb2312" culture="zh-CN"/>
       </system.web>
    </location>

  • 相关阅读:
    注册表开启或关闭ie浏览器-局域网设置-自动监测设置
    关于win32接口文档位置
    网站添加天气预报插件
    json
    re正则
    配置文件
    logging日志模块
    hashlib加密
    sys模块
    os模块
  • 原文地址:https://www.cnblogs.com/Leo_wl/p/1938302.html
Copyright © 2011-2022 走看看