Hi..
I need one c# code to update the table when the browser is closed or web application tab is closed.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Midhun TpPosted Sep 29, 2016, 9:09 AM
As per my knowledge, there is no way you can identify the closing of browser or tabs from c#. The only option is to use onbeforeunload function in clientside for the same. Please refer below link-
http://www.w3schools.com/jsref/event_onbeforeunload.asp
In the script, you can call ajax page to update the table-
function myFunction() { //Here call ajax function return ""; }
Not sure about whether it works on every browser or works perfectly. You have to test it thoroughly.
Delpin Susai RajPosted Sep 29, 2016, 8:41 AM
Delpin Susai RajPosted Sep 29, 2016, 8:40 AM
Delpin Susai RajPosted Sep 29, 2016, 8:40 AM
Delpin Susai RajPosted Sep 29, 2016, 8:39 AM