Return to Snippet

Revision: 40172
at January 27, 2011 05:23 by pjobson


Initial Code
<asp:button id="btnID" runat="server" CssClass="button" Text="Save Current Screen Contracts"  UseSubmitBehavior="false" OnClientClick="this.disabled=true" />

Initial URL
http://weblogs.asp.net/jeffwids/archive/2009/10/06/how-to-disable-an-asp-net-button-when-clicked.aspx

Initial Description
this will disable a button after the first click, but will continue to do its original postback. Note: if it has a custom css class, then the button will still appear clickable, with the exception that the text of the button gets the slight disabled look. But in reality, it really is disabled.

Initial Title
Disable ASP.NET button on click (but still postback)

Initial Tags
button

Initial Language
ASP