I have an ASP.NET button that I need to disable after the user clicks it to prevent double-clicking. Once the submit completes it has to be enabled again. Can anyone help me with this?
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;