asp.net - Session_End doesn't call after i close browser -
i use below setting in web.config
<sessionstate mode="inproc" cookieless="false" timeout="10"/>
...
<authentication mode="forms"> <forms loginurl="login.aspx" timeout="10"/>
and in session_end
according session's value change column's value in database (if column's value 1 means user online) after day user close browser column's value steel 1 (means session_end doesn't call after user close browser)
no session_end not call on page close. need use script
<script> window.onbeforeunload = function (evt) { var message = ‘are sure want leave?’; if (typeof evt == ‘undefined’) { evt = window.event; } if (evt) { evt.returnvalue = message; } return message; } </script>
using script can identify when user closes browser
Comments
Post a Comment