title: Why doesn't returning false from OnClientClick cancel the postback
body: <p>I have a <code>LinkButton</code> where I use the <code>OnClientClick</code> property to ask the user whether he really wants to perform an action, e.g:</p>
  
  <pre><code>&lt;script&gt;
  function confirmDelete() {
    return confirm('Do you really want to delete?');
  }
  &lt;/script&gt;
  
  &lt;asp:LinkButton runat="server" OnClientClick="return confirmDelete()" ... /&gt;
  </code></pre>
  
  <p>This pattern usually works, but on this specific page, it doesn't. No matter whether I click OK or Cancel in the confirm dialog, the postback is executed.</p>
  
  <hr>
  
  <p>Just for completeness (to answer pst's question): the rendered HTML is OK. E.g. it looks like this:</p>
  
  <pre><code>&lt;a id="ctl00_c1_content_btnDelete" onclick="return confirmDelete();"
   href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(..))"
  ... &gt;
    Delete
  &lt;/a&gt;
  </code></pre>