Is there a way to capture the close event of a browser in Silverlight application? I have implemented the following code in my .aspx page:
function confirmClose() {
return "Any message here will prompt a dialog box \n" +
"before closing the window.";
}
window.onbeforeunload = confirmClose;
When this function is triggered, a popup window with OK and CANCEL buttons will appear.
Is it possible to retrieve the value of what the user clicks either in Silverlight or on the server side?
Appreciate any help. Thank you.