Of course this is because he used session variables to store the fields and companies and so on - that's no sweat. So I then thought to myself I'll just set those to nothing when the index.asp page loads. Problem is that he set those variables in the global.asa with Session_OnStart.
Now I can do a couple of things to end the session (like Session.Abandon) but what I want to do is to make sure that ONLY on the index.asp page loads it starts the session again. I thought about using something like this:
If Request.ServerVariables("SCRIPT_NAME") = "index.asp" then
Session.Abandon
End If
but of course it works great if I stay on the index because it kills the session right after it starts it, but it fails when I go to another page then back to the index.asp ...... anyways, to sum it up, does anyone know a way to do this without having to change the structure of the pages?
thanks
Session.Abandon
End If
Try this
If Request.ServerVariables("SCRIPT_NAME") = "index.asp" then
server.transfer("/session_end.asp")
End If
And session_end.asp will have the session destroy commands + another server.transfer("index.asp") but this one goes back to the main page and starts a new session. With server.transfer your client will never notice that the page has changed to session_end.asp and back to index.asp
That's most likely what I would do in this situation.
Hope this helps :)