In ASP.NET i need to update column in database when user close the browser ( the user already logged in site ). Here i want update log out Time column in DB. Is it possible?
In ASP.NET i need to update column in database when user close the browser or clear the browser history ( the user already logged in site ). Here i want update log out Time column in DB. Is it possible?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Javeed M ShaikhRank #839 · 2.7K reputationPosted Aug 23, 2012, 12:13 AM EDT
or
Akshay PatelRank #99 · 21.8K reputationPosted Sep 3, 2012, 1:01 AM EDT
.aspx page code
<head runat="server">
<script type="text/javascript">
function loadOut() {
__doPostBack("Clear()",1)
}
script>
head>
<body onbeforeunload="loadOut()">
.cs code
public void Clear()
{
//In this function you can update logout time column in db.
}