RSS

System.Uri Properties Result

13 Aug

In URL manipulation, System.Uri is necessary. Below are 3 examples of how a url translated to System.Uri properties:

https://stack247.wordpress.com/?s=stack
AbsolutePath = /
AbsoluteUri = https://stack247.wordpress.com/?s=stack
UserEscaped = stack247.wordpress.com
Fragment =
host = stack247.wordpress.com
HostNameType = Dns
LocalPath = /
OriginalString = https://stack247.wordpress.com/?s=stack
PathAndQuery = /?s=stack
UserEscaped = 80
Query = ?s=stack
Scheme = http
Segments[0] = /
UserEscaped = False
UserInfo =

https://stack247.wordpress.com/2011/03/02/stack/
AbsolutePath = /2011/03/02/stack/
AbsoluteUri = https://stack247.wordpress.com/2011/03/02/stack/
UserEscaped = stack247.wordpress.com
Fragment =
host = stack247.wordpress.com
HostNameType = Dns
LocalPath = /2011/03/02/stack/
OriginalString = https://stack247.wordpress.com/2011/03/02/stack/
PathAndQuery = /2011/03/02/stack/
UserEscaped = 80
Query =
Scheme = http
Segments[0] = /
Segments[1] = 2011/
Segments[2] = 03/
Segments[3] = 02/
Segments[4] = stack/
UserEscaped = False
UserInfo =

http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=stack+247
AbsolutePath = /search
AbsoluteUri = http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=stack+247
UserEscaped = www.google.com
Fragment =
host = www.google.com
HostNameType = Dns
LocalPath = /search
OriginalString = http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=stack+247
PathAndQuery = /search?sourceid=chrome&ie=UTF-8&q=stack+247
UserEscaped = 80
Query = ?sourceid=chrome&ie=UTF-8&q=stack+247
Scheme = http
Segments[0] = /
Segments[1] = search
UserEscaped = False
UserInfo =

Advertisements
 
Leave a comment

Posted by on August 13, 2011 in General

 

Tags: , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: