Monday, July 6, 2015

How to retrieve the current page URL in asp.net

To do this using the coding window you can write the following code
Request.Url.AbsoluteUri
This will give you the absolute url of the current page you are in.
There is another method to to do this thing
if you need the  parts between http : // and .xxx ,you can use as follow
string url = Request.Url.Host;

Cheers!!!

No comments:

Post a Comment