Search code examples
asp.netfirefoxradiobuttonlist

Disable a RadioButtonList Item - Firefox


In an ASP.NET 2.0 project I've got a RadioButtonList. I'd like to disable one of the items in this list, but when I change the Enable property of an item to false it just wrappers the item with a span instead of disabling the Input when rendered to Html:

<span disabled="disabled">
   <input id="ctl00_RadioGroup_2" type="radio" value="OK" name="ctl00$RadioGroup">
   <label for="ctl00_RadioGroup_2">Ok</label>
</span>

This works Fine on IE9 but on FF4 the radio button is still enabled.

Any quick solution for this issue? Or is the only way would be some Javascript?


Solution

  • span-tag doesn't have a disable attribute. check w3c it will be better to use javascript to set disable to each radio input element