添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

HttpContext.Current.Request.Url.PathAndQuery

1、通过ASP.NET获取

如果测试的url地址是 http://www.test.com/testweb/default.aspx ,

结果如下:

Request.ApplicationPath:                /testweb

Request.CurrentExecutionFilePath:       /testweb/default.aspx

Request.FilePath:                       /testweb/default.aspx

Request.Path:                           /testweb/default.aspx

Request.PhysicalApplicationPath:        E:\WWW\testweb

Request.PhysicalPath:                   E:\WWW\testweb\default.aspx

Request.RawUrl:                         /testweb/default.aspx

Request.Url.AbsolutePath:               /testweb/default.aspx

Request.Url.AbsoluteUrl: http://www.test.com/testweb/default.aspx

Request.Url.Host: http://www.test.com/

Request.Url.LocalPath:                  /testweb/default.aspx