Disabling RadioButtonList Control List Item

When working with a RadioButtonList control and if you wish to disable one of the list items in it , the very obvious solution would be as mentioned below

radioList.Items[1].Enabled = false;

But to surprise this does not work.

Bingo...the solution to this problem is to use as mentioned below

radioList.Items[1].Attributes.Add("disabled", "disabled");

Happy Coding....

Comments

Popular posts from this blog

Jesus - God Thinks of you.

ASP.NET 4.0 Feature - URL Routing

Tips on JQuery Intellisense in VS 2008