title: How to disable a linkbutton to prevent multiple submits
body: <p>I have HTML code like this:</p>
  
  <pre><code>&lt;asp:LinkButton ID="AddButton" runat="server" OnClick="AddPatientBtn_Click"&gt;
  &lt;span class="Normal"&gt;Add&lt;/span&gt;
  &lt;/asp:LinkButton&gt;
  </code></pre>
  
  <p>I find if we click 'Add' several times, it will add several patient records, so I want to change the code like this:</p>
  
  <pre><code>&lt;asp:LinkButton ID="AddButton" runat="server" OnClick="AddPatientBtn_Click" OnClientClick="return DisableButton(this)"&gt;
  &lt;span class="Normal"&gt;Add&lt;/span&gt;
  &lt;/asp:LinkButton&gt;
  </code></pre>
  
  <p>js:</p>
  
  <pre><code>function DisableButton(button) {
  
  document.all("AddButton").click;
  button.href = "javascript:void(0);";
  button.setAttribute("disabled", "disabled");
  
  }
  </code></pre>
  
  <p>But this doesn't work; I can still add many patient records.</p>
  
  <p>What should I do?</p>