http://localhost/test/View.aspx?Fid=7&NkeMu=思想政治&NTiXi=填空题&KeMu=4取NTiXi值的时候显示      填空?KeMu=4为什么?

解决方案 »

  1.   

    <globalization requestEncoding="gb2312" responseEncoding="gb2312"/>web.config里加
      

  2.   

    中文最好编后後传Server.HtmlEncode()//编码
    Server.HtmlDecode()//解码
      

  3.   

    "http://localhost/test/View.aspx?Fid=7&NkeMu=" +
            System.Web.HttpUtility.UrlEncode("思想政治") + "&NTiXi=" +
            System.Web.HttpUtility.UrlEncode("填空题") + "&KeMu=4";
      

  4.   

    赋值的时候编码
    string s = "http://localhost/test/View.aspx?Fid=7&NkeMu=" + Server.UrlEncode("思想政治" + "&NTiXi=" + Server.UrlEncode("填空题") + "&KeMu=4";取值的时候解码
    string s1 = Server.UrlDecode(Request.QueryString["NkeMu"]);
      

  5.   

    赋值的时候编码string s = "http://localhost/test/View.aspx?Fid=7&NkeMu=" + Server.UrlEncode("思想政治") + "&NTiXi=" + Server.UrlEncode("填空题") + "&KeMu=4";取值的时候解码
    string s1 = Server.UrlDecode(Request.QueryString["NkeMu"]);
    string s2 = Server.UrlDecode(Request.QueryString["NTixi"]);
    Response.Write(s1 + " " + s2);