比如,我当前请求的地址是
http://localhost:2911/UL/researchlist.aspx?keyword=1&productTypeId=7&startPrice=10
我用
Request.CurrentExecutionFilePath只能获取到http://localhost:2911/UL/researchlist.aspx
需要怎么样才能连着参数一起获取到呢?大家帮下忙,谢谢。

解决方案 »

  1.   

    http://www.test.com/testweb/default.aspxRequest.ApplicationPath: /testweb
    Request.CurrentExecutionFilePath: /testweb/default.aspx
    Request.FilePath: /testweb/default.aspx
    Request.Path: /testweb/default.aspx
    Request.RawUrl: /testweb/default.aspx
    Request.Url.AbsolutePath: /testweb/default.aspx
    Request.Url.AbsoluteUri: http://www.test.com/testweb/default.aspx
    Request.Url.Host: www.test.com
    Request.Url.LocalPath: /testweb/default.aspx 
      

  2.   


    这些最好都加上.ToString,否则容易出现未将对象引用到实例的错误的。