Disable asp.net button after click to prevent double clicking
Here is a solution that works for the asp.net button object. On the front end, add these attributes to your asp:Button definition:
<asp:Button ... OnClientClick="this.disabled=true;" UseSubmitBehavior="false" />
In the back end, in the click event handler method call, add this code to the end (preferably in a finally block)
myButton.Enabled = true;
I have found this, and it works:
btnSave.Attributes.Add(
"onclick",
"this.disabled = true;" + ClientScript.GetPostBackEventReference(btnSave, null) + ";");