Gives solution for any Error occurs in any Programming Language, .Net Core 3.1, 3.0, C#,Asp.Net,Sqlserver,MVC,Java,Php,Html,Css,Jquery,errors and solutions,Latest News,Technology

Friday, 29 April 2016

Enable,Disable textbox or combobox or textarea using ASP.Net,JQuery

No comments :
I will explain about how to enable or disable user controls like textbox, textare, dropdownlist, combobox, datepicker ,etc.. using Asp.Net and Jquery.

Using Asp.Net there is an property for enable a controls as Enabled=true/false

<asp:TextBox ID="txtbox" runat="server" Width="50%" CssClass="form-control" Enabled="false"></asp:TextBox>
<input type="textbox" id="txtbox"/>

Using Jquery there is an property called as disabled(true/false)

$('[ID$=txtbox]').attr('disabled',true); //This is for asp.net controls
$('#txtbox').attr('disabled',true');//This is for html controls

No comments :

Post a Comment