2008/07/27

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

测试的url地址是 http://www.brokenman.cn/China/default.aspx 结果如下:

Request.ApplicationPath

结果:/China

Request.CurrentExecutionFilePath:

结果:China/default.aspx

Request.FilePath:

结果:/China/default.aspx

Request.Path:

结果:/China/default.aspx

Request.PhysicalApplicationPath:

结果:E:\WWW\China\

Request.PhysicalPath:

结果:E:\WWW\China\default.aspx

Request.RawUrl:

结果:/China/default.aspx

Request.Url.AbsolutePath:

结果:/China/default.aspx

Request.Url.AbsoluteUri:

结果:http://www.brokenman.cn/China/default.aspx

Request.Url.Host:

结果:http://www.brokenman.cn/


Request.Url.LocalPath:

结果:/China/default.aspx

没有评论: