Posted By

pjobson on 01/27/11


button disable

Versions (?)

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

 / Published in: ASP


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.

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

Report this snippet  

You need to login to post a comment.