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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Delpin Susai RajRank #53 · 29.5K reputationPosted Sep 29, 2016, 4:39 AM EDT
Delpin Susai RajRank #53 · 29.5K reputationPosted Sep 29, 2016, 4:40 AM EDT
Delpin Susai RajRank #53 · 29.5K reputationPosted Sep 29, 2016, 4:40 AM EDT
Delpin Susai RajRank #53 · 29.5K reputationPosted Sep 29, 2016, 4:41 AM EDT
Midhun TpRank #388 · 6.5K reputationPosted Sep 29, 2016, 5:09 AM EDT
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.