C#获取URL地址

来源:互联网 发布:github上java开源项目 编辑:程序博客网 时间:2024/05/09 07:30

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

原创粉丝点击