I have a .Net 2.0 C# web application that has important information stored in Sessions that needs to be deleted when the user closes the browser. I know of three ways a user can close their browser:
- Presses "X" button in top right of browser
- Presses Alt-F4
- From browser menu selects File -> Close
Are there any .Net methods for detecting the closing of the browser window so that I can do a call to "Session.Abandon()"? The method must be cross-browser compatible for at least IE6, IE7 and Firefox.
Thanks.