"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:Or**************@TK2MSFTNGP12.phx.gbl...
"Kit Truong" <ki*@e-nablesolutions.ca> wrote in message
news:Pn********************@news20.bellglobal.com. .. Is there any way in ASP to catch a destroyed session when the user
closes their window.
Example.
- When a user enters a page, I create a session - Session("blah")="blah"
- However when the window is closed, the session is destroyed,
This is not true.
but before
it's being destroyed, I want to some things....
Sub Session_OnEnd()
'''your code
End Sub
in global.asa in the application root.
Ray at work
session_onend is not a good place to put any code. It doesn't fire reliably.
Better find somewhere else to run code which does any clean up you might
need.
There is no way for the web server to know that you have closed a browser
down.
--
John Blessing
http://www.LbeHelpdesk.com - Help Desk software priced to suit all
businesses
http://www.free-helpdesk.com - Completely free help desk software !
http://www.lbetoolbox.com - Remove Duplicates from MS Outlook