title: Confirmation box from server side in asp.net
body: <p>I want to show the confirmation box in asp.net from server side:</p>
  
  <p>I want to call it from server side because I have to take the customer message from server side. I am using the below code </p>
  
  <pre><code>    string str = "Are you sure, you want to Approve this Record?";
          ClientScript.RegisterStartupScript(typeof(Page), "Popup", "return confirm('" + str + "');",true);
  // More code ....
  </code></pre>
  
  <p>Now it is showing the popup and irrespective of what I click, whether "ok" or "Cancel", my code is executing. </p>
  
  <p>Please let me know how can I restrict code to be executed when user select "cancel" in the confirmation box.</p>