Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perform code when App closes

Status
Not open for further replies.

vituja123

Programmer
Jun 16, 2005
110
US
Hi All,

I need to do some cleanup when the user either closes the browser or leaves my application.

I think this should go into the Global.asax file.

However I placed some code under the Application_End sub but it never fires. In fact, none of the ASA subs fire. I even placed a breakpoint in the start sections which never seems to fire.

How can it get some code to execute when the user closes teh browser or navigates away from my app?
 
Put it in the Session_onEnd procedure. However, this will only fire when the session expires which could be 20 minutes after the user logs out of your website unless you have some means of ending the session.

Mighty
 
Thanks Mighty.


But there is no way of knowing if the browser closes or the user navigates away?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top