ASP.NET中获取地址
时间:2011-02-24 来源:蛀虫
Request.PhysicalApplicationPath
F:\Projects\Office Automation System\Web
System.IO.Path.GetDirectoryName(Request.PhysicalApplicationPath)
F:\Projects\Office Automation System\Web\User
System.IO.Path.GetDirectoryName(Request.PhysicalPath)
F:\Projects\Office Automation System\Web\User\Test.aspx
Request.PhysicalPath
Test.aspx
System.IO.Path.GetFileName(Request.PhysicalPath)
/OAS/User/Test.aspx
Request.FilePath
/OAS
Request.ApplicationPath
http://127.0.0.1:8080/OAS/User/Test.aspx?id=1
Request.Url
http://127.0.0.1:8080/
Request.Url.GetLeftPart(System.UriPartial.Authority)