check url asp script is runnig from

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Hello,

I want to handle with 404 error via asp .net script. I need to know what url
was eneterd by user. Can I do it ? How to retrieve current site url in asp
..net ?

Thanks
 
Request.ServerVariables("QUERY_STRING")

That will only return the Query String (the part of the URL following the
"?" character). All of the information about the URL is contained in
Request.Url. This class categorizes the various parts of a Uri. You may find
that all you need is Request.RawUrl, which is the part of the URL following
the Domain information.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Back
Top