Get Page Path Details and URL
if we have URL Like :
http://localhost:96/Cambia3/Temp/Test.aspx?q=item#fragment to get App Path:
to get App Path with page name:
to get page path:
to get path:
to get local page path:
to get absolute path:
to get physical path:
to get page with query:
to get url with query:
to get url:
to get host:
to get full host:
to get full host:
to get port:
to get query string:
to get schema :
http://localhost:96/Cambia3/Temp/Test.aspx?q=item#fragment to get App Path:
- <code>
- Request.ApplicationPath
- result : Cambia3
- </code>
- <code>
- Request.CurrentExecutionFilePath
- result : Cambia3/Temp/Test.aspx
- </code>
- <code>
- Request.FilePath
- result : Cambia3/Temp/Test.aspx
- </code>
- <code>
- Request.Path
- result : Cambia3/Temp/Test.aspx
- </code>
- <code>
- Request.Url.LocalPath
- result : Cambia3/Temp/Test.aspx
- </code>
- <code>
- Request.Url.AbsolutePath
- result : Cambia3/Temp/Test.aspx
- </code>
- <code>
- Request.PhysicalApplicationPath
- result : D:\Inetpub\wwwroot\CambiaWeb\Cambia3
- </code>
- <code>
- Request.RawUrl
- result : Cambia3/Temp/Test.aspx?query=arg
- </code>
- <code>
- Request.Url.PathAndQuery
- result : Cambia3/Temp/Test.aspx?query=arg
- </code>
- <code>
- Request.Url.AbsoluteUri
- result : http://localhost:96/Cambia3/Temp/Test.aspx?query=arg
- </code>
- <code>
- Request.Url.Host
- result : localhost
- </code>
- <code>
- Request.Url.Authority
- result : localhost:96
- </code>
- <code>
- Request.Url.Authority
- result : localhost:96
- </code>
- <code>
- Request.Url.Port
- result : 96
- </code>
- <code>
- Request.Url.Query
- result : ?query=arg
- </code>
- <code>
- Request.Url.Scheme
- result : http
- </code>