.NET 取本页URL地址的方法的总结

时间:2015/12/2 14:50:00来源:互联网 作者:flyso 点击: 902 次

取本页URL地址的方法是(总结):

=============================================================

测试的url地址是http://www.kxck.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.AbsoluteUri:
  结果:http://www.kxck.com/testweb/default.aspx
Request.Url.Host:
  结果:www.test.com
Request.Url.LocalPath:
  结果:/testweb/default.aspx  

Copyright © 2005 - 2016 flyso.cn. 飞搜 版权所有 鄂ICP备11002783号-3