title: Create dialog confirm in server site ASP.NET
body: <p>I want to create a dialog confirm in ASP.NET.</p>
  <p>I'm doing it with this code:</p>
  <pre><code>protected void Button1_Click(object sender, EventArgs e)
  {
      ClientScriptManager CSM = Page.ClientScript;
      
      string strconfirm = &quot;&lt;script&gt;if(!window.confirm('Are you sure?')){window.location.href='Default.aspx'}&lt;/script&gt;&quot;;
      CSM.RegisterClientScriptBlock(this.GetType(), &quot;Confirm&quot;, strconfirm, false);
          
      if (the condition to yes clicked)
      {
          // do something ....
      }
      else 
      {
          // do something else ....
      }
  }
  </code></pre>
  <p>How can I get the yes / no condition in this case?</p>
  <p>Thanks for reading my post</p>