how to know user has closed application directly.

Posted by Abhi_patil under ASP.NET on 4/7/2009 | Views : 1194 | Status : [Member] | Replies : 1
i want to perform some code when user closes application directly.

i want to tranfer control to logout page when user closes application directly.




Responses

Posted by: Vuyiswamb on: 4/7/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Day Abhi_patil

I assume you mean when a user click the (X) button to close the page. This can be done in Javascript like this

<BODY onUnload="alert('Are you sure

you have spent long enough on this lovely page?')">


or Check this

http://simonwillison.net/2004/May/26/addLoadEvent/

Thank you for Posting in DotnetFunda

Were are looking forward for your reply

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Abhi_patil, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response