title: Is there a way to get the response from a user when they click on the pop up message created when they close the window?
body: <p>So I have a Silverlight project and in this Silverlight project I have a C# file where in one of the methods I use the following code to call a Javascript function:</p>
  
  <pre><code>HtmlPage.Window.Invoke("closeApplication");
  </code></pre>
  
  <p>The closeApplication function is as follows:</p>
  
  <pre><code>function closeApplication() 
  {
      window.close();
  }
  </code></pre>
  
  <p>This produces the pop message that says:</p>
  
  <p>The webpage you are viewing is trying to close the window.</p>
  
  <p>Do you want to close this Window?</p>
  
  <p>Yes    No</p>
  
  <p>I want to know if there is a way to get the users response because if it's no. In my c# file after I call the HtmlPage.Window.Invoke("closeApplication"); function, I want to call a different method in that c# file. </p>