Search code examples
asp.netradio-buttonradiobuttonlist

ASP.Net RadioButton visibility inside a RadioButtonList


Is there a way to hide radio buttons inside a RadioButtonList control programmatically?


Solution

  • Under the hood, you can access the attributes of the item and assign it a CSS style.

    So you should be able to then programmatically assign it by specifying:

    RadioButtonList.Items(1).CssClass.Add("visibility", "hidden")
    

    and get the job done.