ASP.NET 取得 Request URL 的各个部分和通过ASP.NET获取URL地址的方法

来源:互联网 发布:电玩城斗牛软件 编辑:程序博客网 时间:2024/05/14 19:24

 

网址:http://localhost:1897/News/Press/Content.aspx/123?id=1#tocRequest.ApplicationPath/Request.PhysicalPathD:/Projects/Solution/web/News/Press/Content.aspxSystem.IO.Path.GetDirectoryName(Request.PhysicalPath)D:/Projects/Solution/web/News/PressRequest.PhysicalApplicationPathD:/Projects/Solution/web/System.IO.Path.GetFileName(Request.PhysicalPath)Content.aspxRequest.CurrentExecutionFilePath/News/Press/Content.aspxRequest.FilePath/News/Press/Content.aspxRequest.Path/News/Press/Content.aspx/123Request.RawUrl/News/Press/Content.aspx/123?id=1Request.Url.AbsolutePath/News/Press/Content.aspx/123Request.Url.AbsoluteUrihttp://localhost:1897/News/Press/Content.aspx/123?id=1Request.Url.SchemehttpRequest.Url.HostlocalhostRequest.Url.Port1897Request.Url.Authoritylocalhost:1897Request.Url.LocalPath/News/Press/Content.aspx/123Request.PathInfo/123Request.Url.PathAndQuery/News/Press/Content.aspx/123?id=1Request.Url.Query?id=1Request.Url.Fragment
Request.Url.Segments/News/Press/Content.aspx/
原创粉丝点击