Click to See Complete Forum and Search --> : browser is closing?


Nasty2
March 4th, 2005, 02:02 PM
Dont know if im posting in the right place!!

Im creating an application using Web Forms in VB.NET attached to a Access DB.

I would like to make some changes in my DB when the user closes his browser.
How can I know if the browser is closing?

SatyaV
March 4th, 2005, 04:52 PM
This is how it works in C#/ASP.Net - maybe it is the same in VB.Net.

I don't believe you can trap the browser closing event. However, you can do your database stuff in Session_End event in the Global.asax file, which will be called when the timeout period expires. Even better, you can provide a signout feature on your page that will abandon the session and call Session_End immediately.