Knowing which page the user come from for logging them back in ASP
I want to change the login process on my application so that after the user is redirected back to the login page when thier username expires that they can be redirected back to the page they were on. My login is done through login.asp
The page that are normally on is called recorddetails.asp which has an include file called sessioncheck.asp which has the following code
yourPage = request.ServerVariables("http_referer")
strUsername = session("Username")
if strUsername = "" or strUsername = NULL then
Response.redirect "login.asp?ReturnUrl=" & yourpage
Now if it was a simple page like recorddetails.asp then it is not a problem but I am also passing the id of the record through the querystring.
so my recorddetails.asp page is the url looks like recorddetails.asp?Id=2665
is there anything I can do pick the whole url rather than just the name of the page.