这是编码的问题建议在你产生
http://localhost/test/test2.aspx?act=中文
这个联接的时候,将"中文"作一次编码,例如:string act = "中文";string url = "http://localhost/test/test2.aspx?act="+Server.UrlEncode(act);Resposne.Redirect( url );

解决方案 »

  1.   

    to timmy3310(tim) :
    我不用 Resposne.Redirect, 而用 window.location=url;
    如何解决?
      

  2.   

    string act = "中文";string url = "http://localhost/test/test2.aspx?act="+Server.UrlEncode(act);Response.Write( "<script language='javascript'>window.location='"+url+"'</script>" );或者你可以把这个URL写到超链接里面
    反正问题是出在参数的编码上,所以用Server.Encode转成编码后传递就行了,随便你用什么方式都可以
      

  3.   

    try 
    http://localhost/test/test2.aspx?act=_中文
      

  4.   

    to timmy3310(tim):
    我这个值是在页面中得到的,所以你的方法行不通
      

  5.   

    用Server.UrlEncode()对中文进行编码。
      

  6.   

    asp可以的,asp.net就不可以,怎么回事,
    难道是bug吗
      

  7.   

    不是Bug因为ASP.Net内部都使用了Unicode
      

  8.   

    用Server.UrlEncode()对URL中的中文进行编码。这样既安全又解决了你的问题!
      

  9.   

    将Web.Config中的UTF-8全部换成GB2312试试
      

  10.   

    修改。。Web.Config。。就可以了。。.Net的全球化问题。。<globalization 
                requestEncoding="gb2312" 
                responseEncoding="gb2312" 
       />
      

  11.   

    <globalization fileEncoding="gb2312" requestEncoding="gb2312" responseEncoding="gb2312" culture="zh-CN" />
      

  12.   

    不改<globalization 
                requestEncoding="gb2312" 
                responseEncoding="gb2312" 
       />
    这里有Vbscript的函数,你可以拿去参考一下,自己做解码
    <script language="vbscript">
    dim str
    str="%5C%D6%D0%B9%FA"
    alert URLDecode(str)
    function URLDecode(enStr)
    dim deStr,strSpecial
    dim c,i,v
    deStr=""
    strSpecial="!""#$%&'()*+,/:;<=>?@[\]^`{|}~%"
    for i=1 to len(enStr)
    c=Mid(enStr,i,1)
    if c="%" then
    v=eval("&h"+Mid(enStr,i+1,2))
    if inStr(strSpecial,chr(v))>0 then
    deStr=deStr&chr(v)
    i=i+2
    else
    v=eval("&h"+Mid(enStr,i+1,2)+Mid(enStr,i+4,2))
    deStr=deStr&chr(v)
    i=i+5
    end if
    else
    if c="+" then
    deStr=deStr&" "
    else
    deStr=deStr&c
    end if
    end if
    next
    URLDecode=deStr
    end function</script>
      

  13.   

    中文==〉
    Server.UrlEncode("中文")