Posted By

krisdb on 03/30/10


Tagged

c-sharp


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

hinesnetwork


Get URL


 / Published in: C#
 

  1. string url = HttpContext.Current.Request.Url.AbsoluteUri;
  2. // http://localhost:1302/TESTERS/Default6.aspx
  3.  
  4. string path = HttpContext.Current.Request.Url.AbsolutePath;
  5. // /TESTERS/Default6.aspx
  6.  
  7. string host = HttpContext.Current.Request.Url.Host;
  8. // localhost

Report this snippet  

You need to login to post a comment.