How get Browser Closing event in asp.net OR javascript

11 Views Asked by At

I am working on web based ERP system where I want to track login and logout status of the user and for this I have maintained User Logout form where I am taking all logout related info and saving it to DB and its working properly but if am Closing tab or browser directly without logout its unable to track this info, so that i want to detect browser or tab close event so that I can track and save info automatically or prompt user to logout . i have find some javascript events like onbeforeunload but its calling every time when I am redirecting from one page to another so its not workable for me is there any solution for this ?

0

There are 0 best solutions below