Loading
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 attend5days leftRegister
Sunny SharmaRank #223 · 11.1K reputationPosted Aug 6, 2013, 3:18 AM EDT
use this Java Script:
window.onbeforeunload = function(){ return 'Do you want to leave ?';}
You cannot disable the close button but you can prompt a user if one really wants to leave.
Happy Coding :)
Riyaz AkhtarRank #2,275 · 619 reputationPosted Aug 6, 2013, 4:57 AM EDT
try below code
yadagiri uppariRank #7,043 · 250 reputationPosted Aug 7, 2013, 2:36 AM EDT
Riyaz AkhtarRank #2,275 · 619 reputationPosted Aug 7, 2013, 2:45 AM EDT
http://www.codeproject.com/Tips/89661/Execute-server-side-code-on-close-of-a-browser
yadagiri uppariRank #7,043 · 250 reputationPosted Aug 7, 2013, 3:16 AM EDT
Riyaz AkhtarRank #2,275 · 619 reputationPosted Aug 7, 2013, 4:37 AM EDT
Please follow below steps:
Step 1:
add jquery in ChatWindow.aspx page:
Step 2:
Add below script in ChatWindow.aspx page:
Step 3:
add below code in ur ChatWindow.aspx.cs file:
Please let us know if you are facing any issue.
yadagiri uppariRank #7,043 · 250 reputationPosted Aug 7, 2013, 11:04 PM EDT
}