title: Prevent double clicking asp.net button
body: <p>I realise this question has been asked but none of the answers worked for my project.</p>
  
  <p>I have a button that when clicked calls an API, so there is a 1 second delay.</p>
  
  <p>I have tried several things nothing works.</p>
  
  <pre><code>btnSave.Attributes.Add("onclick", " this.disabled = true; " + ClientScript.GetPostBackEventReference(btnSave, null) + ";");
  </code></pre>
  
  <p>Even that does nothing.</p>