我两个页面传值:this.Response.Redirect("main.aspx?condtion="+condtion);
而这里的condtion=" and jfrq like '%23%'";
但是在另外的页面:
if(Request["condtion"]!=null&&Request["condtion"].ToString()!="")
cond=Request["condtion"].ToString();
向这样读出来就是:
cond=" and jfrq like '#%'";
不知道怎么了?传的数字就这样,其他的就不!
谢谢!

解决方案 »

  1.   

    url编码问题吧,换种传值方式被..........
      

  2.   

    传值前编码: HttpContext.Current.Server.UrlEncode();
    接收前解码: HttpContext.Current.Server.UrlDecode();
      

  3.   

    我向这样怎么不行:
    this.Response.Redirect("main.aspx?condtion="+HttpContext.Current.Server.UrlEncode(condtion));
    cond=HttpContext.Current.Server.UrlDecode(Request["condtion"].ToString());
    ???
    还是输入数字就那样??
    谢谢!
      

  4.   

    Server.UrlEncode()、或Server.HtmlEncode()等县编码再接收时解码 UrlDncode()--(可能