Hi Everyone,
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:
With javascript I am able to detect that the user presses the X button. Since Javascript is client side and ASP.Net is server side, I can't find a way to kill the sessions through javascript.
Are there any .Net methods for detecting the closing of the browser window so that I can do a call to "Session.Abando n()"? The method must be cross-browser compatible for at least IE6, IE7 and Firefox.
Thanks.
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
With javascript I am able to detect that the user presses the X button. Since Javascript is client side and ASP.Net is server side, I can't find a way to kill the sessions through javascript.
Are there any .Net methods for detecting the closing of the browser window so that I can do a call to "Session.Abando n()"? The method must be cross-browser compatible for at least IE6, IE7 and Firefox.
Thanks.
Comment