Hi..
how to write code on browser close button event ..
i want to log out user and change his status in Database even if he hit the close button of the browser.
I tried this by using page unload event..Its working..But I have some problem in this...
If I refresh the page,this event also gt working(ie, Code for browser close button also works)..
Any other solution for doing this??...
Thanks in advance...
Loading
Ankit NandekarPosted May 3, 2011, 12:49 AM
Sam HobbsPosted May 2, 2011, 7:56 PM
It is not clear to me if you are doing this in a WebBrowser control or not and if you need this to work for all browsers. I am even not sure if you are doing this in the server or the client.
Sam HobbsPosted May 2, 2011, 7:42 PM
Abhimanyu K VatsaPosted May 2, 2011, 7:34 AM
detecting browser close button and then auto logout is always not possible because of session. by decreasing the session check you can detect it but it also can't be executed in the blink of eye.
Deepthi AravindPosted May 2, 2011, 4:10 AM
Thanks for ur reply.
Nice article...
But at the time of page refresh this code(Browser close button functionality) again executes...
I already told about this issue..
sathya kumarPosted May 2, 2011, 3:59 AM
Ankit NandekarPosted May 2, 2011, 3:54 AM
http://aspalliance.com/1294_CodeSnip_Handle_Browser_Close_Event_on_the_ServerSide