Is there a method to run code every time the user closes out of an ASP.NET webpage? I am pretty new to ASP and don't know very much about HTML.
Asked
Active
Viewed 132 times
1 Answers
1
I usually creat an unload function, and add a onbeforeunload
to the parent body of where you'd like the function run, like so
<body onbeforeunload="closingFunction()">
function closingFunction(){
//DO STUFF
}
There may be some more relevant information for you here

Ryan Turnbull
- 3,766
- 1
- 25
- 35