Category : .Net | Author : Chtiwi Malek | First posted : 3/5/2012 | Updated : 3/5/2012
Tags : tutorial, asp.net, c#, vb.net
Request.Url fragments : Uri Paths, Parameters & details

Request.Url fragments : Uri Paths, Parameters & details

The Request.Url is an Uri object containing the informations for the URL of the current request.

To get the URL fragments, I will use the URL below as an example:

http://localhost:2000/virtual_dir/myrep/page.aspx?q=qvalue
Request.ApplicationPath : /virtual_dir
Request.CurrentExecutionFilePath : /virtual_dir/myrep/page.aspx
Request.FilePath : /virtual_dir/myrep/page.aspx
Request.Path : /virtual_dir/myrep/page.aspx
Request.PhysicalApplicationPath : d:\Inetpub\wwwroot\Websitename\virtual_dir\
Request.QueryString : /virtual_dir/myrep/page.aspx?q=qvalue
Request.Url.AbsolutePath : /virtual_dir/myrep/page.aspx
Request.Url.AbsoluteUri : http://localhost:2000/virtual_dir/myrep/page.aspx?q=qvalue
Request.Url.Host : localhost
Request.Url.Authority : localhost:2000
Request.Url.LocalPath : /virtual_dir/myrep/page.aspx
Request.Url.PathAndQuery : /virtual_dir/myrep/page.aspx?q=qvalue
Request.Url.Port : 2000
Request.Url.Query : ?q=qvalue
Request.Url.Scheme : http
Request.Url.Segments : /
virtual_dir/
myrep/
page.aspx
Comments & Opinions :
Thanks
This is a good cheat sheet for what all these URI members hold.  Thanks.
- by S on 4/4/2013
Getting url parameter
guys you really helping. Good work...
Today i was busy, for the first time requesting url parameters in asp.net C sharp. I'm client based developer, i get challenge now and i have to fix it now, if not they tell my boss and i'm getting cold. Thanks.... guys.
- by tsibiso on 10/9/2013
Define simply URL
i have heared from various siurces abt url but still i m little bit confuse that wgat does url exactly do ?? is it a protocall which works as http ...??
- by Naved on 10/9/2013
an URL is an address, just like a phone number or street address.
each website (each page) has an address you call call to grab the page from the server.
- by Help on 10/9/2013
Leave a Comment:
Name :
Email : * will not be shown
Title :
Comment :