The only way would be to trap the onbeforeunload client side event using
javascript, and then make a call to the server to kill the session. The
issue here is that this event is always raised, even if the user is just
browsing to another page on your site - so you need to make sure you only
kill the session at the right time.
"Charlie@NISH" <cf*******@nish.org> wrote in message
news:uS**************@TK2MSFTNGP12.phx.gbl...
Hi:
I would like to clear session when user closes browser window by clicking
the "x" in upper right hand corner. Since this is a client side event,
how do I run server code (Session.Abandon()) when user clicks "x"?
Thanks,
Charlie