My personal preference is to not tied clean up to the normal application
flow. I tend to prefer to have a dedicated clean up routine that cleans
whatever needs to be cleaned.
You could use onbeforeclose but it's likely you'll find cases where it
doesn't fire (such as crashed browser etc...) plus session_end don't work
for other session providers etc...
Patrice
--
"sun" <su*@discussions.microsoft.com> a écrit dans le message de
news:5E**********************************@microsof t.com...
I want to do clean up routine to my database when the browser is closed.
I have my code in session-end - but it never fires when the browser closes.
I cant do onbeforeunload as it will be fired each time when the browser
posts back.
Somehow I want to capture browser close event and fire session abandon
which will call session end. Please help.
Thanks,
Sun