What event is triggered in ASP.Net when you close the browser ?

  • Thread starter Thread starter tomcarr1
  • Start date Start date
T

tomcarr1

What event is triggered in ASP.Net when you close the browser ? What
event is normally used to trigger clean up stuff when going from one
form to another or leaving the project?
 
What event is triggered in ASP.Net when you close the browser ? What

On the server or the client? On the server, there is no event. The server
has no way of knowing what happens on the client *after* sending a Response.
HTTP is stateless. Fire and forget.

On the client, there is a DOM event in the body - "onunload" - which can be
used on the client to do something with JavaScript when the document
unloads.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

Big thicks are made up of lots of little thins.
 
Back
Top