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?
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.