web.config有没有设为gb2312?
对。默认是utf-8

解决方案 »

  1.   

    <globalization requestEncoding="gb2312" responseEncoding="gb2312" culture="zh-CN"/>
    式式
    我的就是英文环境
      

  2.   

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

  3.   

    Response.ContentEncoding=System.Text.Encoding.UTF8;

    Response.ContentEncoding=System.Text.Encoding.Default;
    ----------------------------------------------------------------
    欢迎试用ASP.NET大文件上传组件
    http://bestcomy.europe.webmatrixhosting.net
    ----------------------------------------------------------------
      

  4.   

    顶阿!
    我也遇到同样问题!
    数据存到数据库中都变成乱码了!
    web.config配置
    <?xml version="1.0" encoding="gb2312" ?>
    <globalization 
                requestEncoding="gb2312" 
                responseEncoding="gb2312" 
                culture="zh-CN"
       />
    ....
    //取字符串
    string name = Request.Params["name"] ;
    ……
    string req = "name="+ System.Web.HttpUtility.UrlEncode(name.Text, System.Text.Encoding.UTF8);//通过地址栏传值。http://localhost/try/bbs/postmessage.aspx?name=%e7%90%90%e7%90%90%e7%a2%8e%e7%a2%8e
      

  5.   

    解决了!!!!!!!!!
    web.config设置为
    <?xml version="1.0" encoding="utf-8" ?>或者
    <?xml version="1.0" encoding="gb2312" ?>关键是
    <globalization 
                requestEncoding="utf-8" 
                responseEncoding="utf-8" 
               culture=
       />
    就对了
      

  6.   

    乱码
    chaos
    [5keIRs]
    n.混乱, 混沌(宇宙未形成前的情形)confusion disorder mix-up muddle 
    cosmos chaos
    AHD:[k硴約擼
    D.J.:[6kei7%s]
    K.K.:[6ke7$s]
     n.
    A condition or place of great disorder or confusion.
    A disorderly mass; a jumble:
    The desk was a chaos of papers and unopened letters.
    OftenChaos
    The disordered state of unformed matter and infinite space supposed in some cosmogonic views to have existed before the ordered universe.
     Obsolete
    An abyss; a chasm.Middle English[ formless primordial space ]
    fromLatin
    fromGreek khaoschaotic
    AHD:[-紅摴k] adj.
    chaoticallychaos
    AHD:[k硴約擼
    D.J.:[6kei7%s]
    K.K.:[6ke7$s]
     n.
    A condition or place of great disorder or confusion.
     无秩序极度混乱或紊乱的状态或地方
    A disorderly mass; a jumble:
     混乱杂乱的一堆;乱成一团:
    The desk was a chaos of papers and unopened letters.
    桌上杂乱地堆放着一些纸张和未拆的信
    OftenChaos
    常作Chaos
    The disordered state of unformed matter and infinite space supposed in some cosmogonic views to have existed before the ordered universe.
     混沌世界一些宇宙起源论认为的在有序宇宙形成以前的未成形物质和无尽空间的混乱状态
     Obsolete
     【废语】
    An abyss; a chasm.
    深渊;裂缝Middle English[ formless primordial space ]
    中古英语[ 未成形的原始空间 ]
    fromLatin
    源自拉丁语
    fromGreek khaos
    源自希腊语 khaoschaotic
    AHD:[-紅摴k] adj.
    chaoticallychaos
    maryland chaos group-中国历史年表
    http://www-chaos.umd.edu/history/time_line.html
     
    maryland chaos group-中国历史
    http://www-chaos.umd.edu/history/welcome.html
     chaos
    源自希腊语 chaos 大口
    [5keIRs]
    n
    混乱;无秩序 
    混沌状态confusion disorder mix-up muddle 
    cosmos chaos
    [5 keiCs]
    n.
    [常用C-] (天地未出现前的)浑沌世界
    无秩序, 混乱
    [古]无底深渊
    molecular chaos
    分子混沌见 confusion
      

  7.   

    在web.config 里的下面的节点处设置就可以了。
     <globalization 
                requestEncoding="utf-8" 
                responseEncoding="utf-8" 
       />
      还有要注意你的
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    这里。 呵呵