Pages

Search This Blog

Monday, 6 January 2014

jQuery to disable html controls (Label, Text box, Dropdown, etc.,)

There will be scenarios where you want your html controls (say label, button, text box, drop down) to be disabled. The following code does the trick.
 <input type="text" id="txtCustomerName" runat="server" />

$('#txtCustomerName').prop("disabled",true);

No comments:

Post a Comment