asp.net用requst取得文件名及URL 的各个部分

来源:互联网 发布:电脑 地图软件 编辑:程序博客网 时间:2024/05/29 07:30
Request.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/
123
原创粉丝点击