Saturday, 4 November 2017

Disable TextBox And DropDownList From Code Behind

1. > For DropDownList
DropDownList1.Attributes.Add("disabled", "disabled");

2. > For TextBox
TextBox1.Attributes.Add("readonly","readonly");

3. > To Enable DropDownList Or TextBox
DropDownList1.Attributes.Remove("readonly");
TextBox1.Attributes.Remove("readonly");

No comments:

Post a Comment

React Hooks - custom Hook

  v CustomHook Ø React allows us to create our own hook which is known as custom hook. Example – 1 localStorage Demo Step-1 Create ...