zoukankan      html  css  js  c++  java
  • 修改Web.config配置节点去掉DateTime.Now取值中的AM、PM

    全站应用utf-8格式,在web.config里的<system.web></system.web>节点内插入globalization节点。如下:

    <globalization requestEncoding=”utf-8″ responseEncoding=”utf-8″ fileEncoding=”utf-8″ />


      某个页面要设置gb2312编码格式
      方法是: 在webconfig文件configuration元素下配置以下字节,path 可以目录路径,也可以单独指向某个文件..
    <location path=”Agent/index.aspx”>
    <system.web>
    <globalization fileEncoding=”gb2312″ requestEncoding=”gb2312″ responseEncoding=”gb2312″ culture=”zh-CN”/>
    </system.web>
    </location>


    web.config如下

    <?xml version="1.0" encoding="utf-8"?>

    <configuration>

        <appSettings/>

        <connectionStrings/>

        <system.web>
              <!--all-->
              <globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8" culture="en-US"/>        
         </system.web>
         <location path="Agent/Index.aspx">
               <system.web>
                   <!--one-->

                   <globalization requestEncoding="gb2312" responseEncoding="gb2312" fileEncoding="gb2312" culture="zh-CN"/>
                </system.web>
          </location>

    </configuration>

  • 相关阅读:
    Mac上安装Python3虚拟环境(VirtualEnv)教程
    django 安装验证码插件captcha
    OS path 的常见应用
    os 相对路径与绝对路径
    RecursionError: maximum recursion depth exceeded while calling a Python object
    java爬虫爬取博客园数据
    SVN
    Jwt验证
    Vuex
    SPA项目开发之CRUD+表单验证
  • 原文地址:https://www.cnblogs.com/sumg/p/8399089.html
Copyright © 2011-2022 走看看