how to know logout account issue? asp.net
i want to know when account logout without logout button click.
actually i want to manage dashboard. with some events like login, logout with it's activity date a开发者_如何学Gond time.
so if any user login so i will entry for login. and if any user direct close browser so how can i manage logout entry in database.
You cannot reliably detect the user closing the browser or leaving the website.
The way this is typically done is by measuring inactivity period - if the user has had no activity for, say, 15 minutes, assume that he has left.
The browser will fire a clientside event when it is closing, you should then be able to send a request to your server using javascript.
But as driis said, it is not 100% reliable.
http://aspalliance.com/1294_codesnip_handle_browser_close_event_on_the_serverside EDIT: Sorry, that article was not nearly as useful as i thought.
精彩评论