当前位置: 编程技术>.net/c#/asp.net
asp.net获取url地址的方法
来源: 互联网 发布时间:2014-08-30
本文导语: 如何用asp.net代码获取 url地址呢,本文分享一种方法。 测试用url地址:http : //www.test.com/testweb/default.aspx 结果如下: request.applicationpath: /testweb request.currentexecutionfilepath: /testweb/default.aspx request.filepath: /testweb/default.aspx reque...
如何用asp.net代码获取 url地址呢,本文分享一种方法。
测试用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"testwebrequest.physicalpath:
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: www.test.com
request.url.localpath: /testweb/default.aspx
request.currentexecutionfilepath: /testweb/default.aspx
request.filepath: /testweb/default.aspx
request.path: /testweb/default.aspx
request.physicalapplicationpath: e:"www"testwebrequest.physicalpath:
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: www.test.com
request.url.localpath: /testweb/default.aspx