I want to add some stuff to a database when a sessions is ended or abondoned. I tried to do this in the global.asa file within the session_onend sub.
I am using Session variables in my querystring...
is it at al possible what i am trying ?
Printable View
I want to add some stuff to a database when a sessions is ended or abondoned. I tried to do this in the global.asa file within the session_onend sub.
I am using Session variables in my querystring...
is it at al possible what i am trying ?
Should be. Why don't you try doing it and see what happens ;)
I think if you do a search on the topic, you will find that most ppl that have attempted to do this have found that the session_onend event sometimes fires, and sometimes doesn't. Go figure...
So far I have not been able to do this succesfully....
I was wondering maybe it was due to the fact that I am using session vraiables inside the session_onend routine.
That's not the problem. The session_onEnd event occurs just before the session terminates so the values are still there. How exactly are you trying to end the session? You're aware that closing the browser does not kill the session right? (At least not on the server side which is where we're concerned here.)
Yes I am aware of that...
strangly I get an run time error when i try to open a connection. I copied the code to the sesion_onstart sub and it worked without a problem...