ASP.NET 取得 Request URL 的各个部分

it2022-05-05  140

网址:http://localhost:1897/News/Press/Content.aspx/123?id=1#toc

Request.ApplicationPath/

Request.PhysicalPathD:\Projects\Solution\web\News\Press\Content.aspx

System.IO.Path.GetDirectoryName(Request.PhysicalPath)D:\Projects\Solution\web\News\Press

Request.PhysicalApplicationPathD:\Projects\Solution\web\

System.IO.Path.GetFileName(Request.PhysicalPath)Content.aspx

Request.CurrentExecutionFilePath/News/Press/Content.aspx

Request.FilePath/News/Press/Content.aspx

Request.Path/News/Press/Content.aspx/123

Request.RawUrl/News/Press/Content.aspx/123?id=1

Request.Url.AbsolutePath/News/Press/Content.aspx/123

Request.Url.AbsoluteUrihttp://localhost:1897/News/Press/Content.aspx/123?id=1

Request.Url.Schemehttp

Request.Url.Hostlocalhost

Request.Url.Port1897

Request.Url.Authoritylocalhost:1897

Request.Url.LocalPath /News/Press/Content.aspx/123

Request.PathInfo/123

Request.Url.PathAndQuery/News/Press/Content.aspx/123?id=1

Request.Url.Query?id=1

Request.Url.Fragment

Request.Url.Segments/News/Press/Content.aspx/123

转载于:https://www.cnblogs.com/binaryworms/archive/2010/04/19/1715542.html

相关资源:各显卡算力对照表!

最新回复(0)