title: Creating Confirmation message when a Delete button clicked on Asp.Net Page
body: <p>i use this codes for a Delete button for a confirmation message :</p>
  
  <pre><code>&lt;asp:Button runat="server" ID="btnDelete" 
   OnClick="btnDelete_Click" 
   OnClientClick="return confirm('Do you want to delete the record ? ');" /&gt;
  </code></pre>
  
  <p>Here is the way to add confirm client script at server side :</p>
  
  <pre><code>btnDelete.Attributes.Add("onclick", 
      "return confirm('Do you want to delete the record ? ');")
  </code></pre>
  
  <p>but I'm getting the (Type Expected) error when debugging could anyone help please?
  Thanks</p>