title: confirmation dialog box in asp.net?
body: <p>In web applicaiton, i am trying to write the code like this.</p>
  
  <pre><code>protected void Button1_Click(object sender, EventArgs e)
  {
      Button1.Attributes.Add("onclick", "if(confirm('Are you sure to delete?')){}else{return false}");
  
      Response.Write("hi");
  }
  </code></pre>
  
  <p>but when first time I click on button it is showing "hi" without confirmation, second time onwords it is showing confirmation.</p>