title: Javascript before asp:ButtonField click
body: <p>I have a <code>GridView</code> control in an Asp.net application, that has a <code>&lt;asp:buttonField&gt;</code> of <code>type="image"</code> and <code>CommandName="Delete"</code>.</p>
  
  <p>Is there any way to execute a piece of javascript before reaching the <code>OnRowDelete</code> event?</p>
  
  <p>I want just a simple confirm before deleting the row.</p>
  
  <p>Thanks!</p>
  
  <p><strong>EDIT</strong>: Please Note that <code>&lt;asp:ButtonField&gt;</code> tag <strong>does not have</strong> an <code>OnClientClick</code> attribute.</p>