Reputation: 269
In my operation i want to edit an employee list. In this time am using the below statement to disable listbox.
this.lstbox.Attributes.Add("Disabled", "");
After the updation am using the below code to enable list box .
this.lstbox.Attributes.Add("enabled", "");
First condition is working properly but second one does not return any error and list box not enabled..
Please help me to fix this..
Upvotes: 0
Views: 1139
Reputation: 1200
without ever touching asp.net but after looking at: "list box enabled example"
can't you just write:
lstbox.Enabled = true;
lstbox.Enabled = false;
Upvotes: 1
Reputation: 57262
I think you should rather remove the "Disabled" attribute:
lstbox.Attributes.Remove("Disabled");
Upvotes: 2