[VS2005 .aspx]
AAA.aspx页面有个链接
<a href="BBB.aspx?id=1&name=中文">哈哈</a>我在BBB.aspx页面Load事件怎么接收? 不显示成乱码(本人确实是ASP.NET新手,没有耍人的意思)

解决方案 »

  1.   

    Server.UrlEncode("中文")
    接收页面进行Server.UrlDecode即可。。
      

  2.   


    AAA.aspx页面 设置语言信息为 utf-8 看看,不行换为 gb2312
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />接收页面进行Server.UrlDecode
      

  3.   

    b.aspx:<a href="a.aspx?id=<%=Server.UrlEncode("姚明") %>">链接</a>
    a.aspx.cs        if (Request.QueryString["id"] != null)
            {
                string i = Server.UrlDecode(Request.QueryString["id"].ToString());
            }
      

  4.   

    BBB.aspx页面直接
    string str=Request["name"];
      

  5.   

    BB页面里面在Page_Load里面写
    request.from.get("name");
    request.from.get("id");
    就能获取到AA页面传过来的值啦
    然后在BB后台里面写HttpUtility.HtmlDecode();解码
      

  6.   

    我一般都是:
    页面写这个<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 然后在后台if (Request.QueryString["id"] != null)
            {
                string i = Server.UrlDecode(Request.QueryString["id"].ToString());
            }
    这样获取
      

  7.   

    <a href="BBB.aspx?name=<%#DataBinder.Eval(Container.DataItem, "name")%>">哈哈 </a> 楼上的方法都试过了,不管用
      

  8.   

    <globalization requestEncoding="Gb2312" responseEncoding="Gb2312"/>
    给配置文件加上这个就行了!