I have written an application and with this application the user has to login. I have a table where I am keeping their login token for that session, datetime they logged in, datetime they logged out and the duration in which they were logged in.
This functionality works great when the user actually goes and clicks Logout
. If the user does not click Logout
, then it will not take the datetime for the logout and it won't give me the duration.
Some users are just simply exiting out without clicking logout basically, is there a way to fire an event I guess when the session ends to capture the logout information?
Right now I just have an insert statement wired up to my login button and update statement wired up to my logout button.
In Global.asax.cs is an event handler
protected void Session_End(object sender, EventArgs e)
{
}
Which should get fired on session end.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments