测试的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.AbsoluteUri:
结果:http://www.test.com/testweb/default.aspx
Request.Url.Host:
结果:www.test.com
Request.Url.LocalPath:
结果:/testweb/default.aspx
取本页URL地址的方法是(总结):
最新推荐文章于 2019-07-27 09:57:37 发布
本文详细记录了一个测试URL(http://www.test.com/testweb/default.aspx)被请求时,.NET框架中HttpRequest对象获取的各种路径信息,包括应用程序路径、当前执行文件路径等。
85万+

被折叠的 条评论
为什么被折叠?



