一个这样的连接http://localhost/prodlsuc.aspx?user=sky&author=管理员在aspx网页中用
Dim author As String = Request.QueryString("author")
得到的author字符串不正确, 如果author字段是英文就没有问题, Request.QueryString不支持中文??

解决方案 »

  1.   

    <system.web>
    <globalization requestEncoding="gb2312" responseEncoding="gb2312" />
    </system.web>
      

  2.   

    如果是像http://localhost/prodlsuc.aspx?user=sky&author=s管理员s这样的连接, author取出来的是"s&#1329;s", 是不是中文都不行的?
      

  3.   

    <system.web>
    <globalization requestEncoding="gb2312" responseEncoding="gb2312" />
    </system.web>
    是不是要写在web.config中的? 能不能不写在web.config中, 写在其他地方?
      

  4.   

    Server.UrlEncode(Request.QueryString("author"));
      

  5.   

    web.config中那样设置可以了,整个项目都起作用。
    http://community.csdn.net/Expert/topic/4219/4219121.xml?temp=.8493769
      

  6.   

    <%@ Page language="c#" Codebehind="dataGridExample2_show.aspx.cs" AutoEventWireup="false" Inherits="aspnetc.dataGridExample2_show" %>
    写在里面也可以的。。仅仅对本页起作用。
      

  7.   

    在传递中文参数时,现对中文进行编码:例如:string sParamValue = HttpUtility.UrlEncode("管理员");然后在你获取参数的页面里面进行解码:string sParamValue = HttpUtility.UrlDecode(Request.QueryString["author"].ToString());