如何记录用户登出网页时间

来源:百度知道 编辑:UC知道 时间:2024/06/02 10:16:05
用户如果并没有点击注销按钮,而是直接关闭网页从而登出,如何记录用户登出网页时间呢?
请高手指点!!

private void btnLogout_Click(object sender, System.EventArgs e)
{
// Remove the authentication ticket
System.Web.Security.FormsAuthentication.SignOut();

// Redirect the user to the root application path
Server.Transfer(Request.ApplicationPath);
}