How to find URL of the site.

  • Thread starter Thread starter Anil
  • Start date Start date
Anil,

It's rather easy. I mean, the page itself should know that it is
default.aspx. You can get the id from the querystring.

As for the rest of the string, you should be able to get it from the Url
property exposed by the Request property (which returns an instance of type
HttpRequest) which will have the Url of the request that was made.

Hope this helps.
 
Take a look at the different properties in the HttpRequest class. There are
properties such as Url, Path, RawUrl, etc.
 
I assume this is in ASP.Net....

See the Request.URL and Request.RawURL properties. They should contain what
you need.
 
Back
Top