if one user close the windows throw X button of the windows, I need one event to do an action (delete the user for example) how I can do it. asp.net(code behind vb.net) bring a solution
What The Event For When I Close The X Button Of The Windows In Asp.net?
November 7th, 2009 by CTO WebOjO.com website designers Lahore Pakistan Leave a reply »Posted in ASP Help
Tags: Asp.net Button Close Event What When Windows
You can follow any responses to this entry through the RSS 2.0 Feed. Responses are currently closed, but you can trackback from your own site.
Advertisement
Try the page_unload event
You have to distinguish between client side events and server side events.
When the browser is closed, the server is unaware of this event. It is strictly a client side event. Keep in mind that HTTP is a stateless protocol.
There is something however you can do. You can write code in the Session_End() function in the global.asax file. The code will run when the session for a user times out.
void Session_End(object sender, EventArgs e) {
// write code
}