Depending on your needs, you can use:
Request.ServerVariables("HTTP_REFERER");
Returns a string containing the URL of the page referenced by the request on the current page using the tag <a>. If the page is redirected, it is HTTP_REFERERempty.
Usually, if I need to know where the user came from, I would set this explicitly in querystring or in a form variable.
source
share