Search code examples
asp-classic

How to know the address of the webpage from which <a href="present page"> was clicked?


I have a login.asp page. Whenever the session expires, the user is given a link to the login page to log in. After logging in, users need to go back to the original page from which the link was clicked. How do I get the address of that webpage?


Solution

  • You could redirect him to

    /login.asp?next=url-of-where-the-user-tried-to-go
    

    Once he logs in, redirect him to the parameter next. This is extremely common.