http://localhost/Web/Login.aspx?RedirectFrom=Customer&UrlReferrer=http://localhost/Web/Customers/CustomersRFQ.aspx?idProduct=1&idCategory=11
我用this.Request["UrlReferrer"]语句,为什么得到的是:“http://localhost/Web/Customers/CustomersRFQ.aspx?idProduct=1”而后面“&idCategory=11”的值不能一起得到。
我的原意是UrlReferrer=“http://localhost/Web/Customers/CustomersRFQ.aspx?idProduct=1&idCategory=11”是一个完整的地址,怎么样才能得到这个完全的地址呢?不能再用第二个Request["idCategory",这样就不合我的原本意向了。

解决方案 »

  1.   

    不对,你提的不对,RawUrl只是得到了URL 中域信息之后的部分
      

  2.   

    使用session吧。建议,你为你其中的参数包含有http://可能会有问题
      

  3.   

    我试过的
    WebForm1中
    Response.Redirect("WebForm2.aspx?url=good832&iojo=9898&fj=9");
    WebForm2中
    Response.Write(Request.RawUrl);
    得到:http://localhost/Test/WebForm2.aspx?url=good832&iojo=9898&fj=9
      

  4.   

    因为你有&符号,所以它以第一个?算的,你要取的话,加
    this.Request["UrlReferrer"] & "idCategory=" & this.Request["idCategory"]
      

  5.   

    cuo le
    this.Request["UrlReferrer"] & "&idCategory=" & this.Request["idCategory"]
      

  6.   

    晕...
    我现在在写第一个网站项目啊.里面全是用传参的啊..结果BUG问题多多啊.晕死..算了.还是不要用传参吧.用session吧..
    改BUG中.......
      

  7.   

    喔.对了.忘给你们说了..
    我开发的项目就是游戏的BUG管理系统,结果这个系统的BUG都是满天飞啊..
    郁闷啊.....