Earl:
This is by design. The ListItem (which myRadioButtonList.Items(0) returns)
isn't actually a Control/WebControl. As such it doesn't go through a
Render/RenderAttribute stage. if you dissassemble RadioButtonList you'll
see the actual checkboxes get rendered in IRepeaterInfo.RenderItem() which
shows the limit to what you can do with listitems...honestly, I'm not sure
why you are able to write into the Attribute property...doesn't quite seem
right...
Karl
"Earl Teigrob" <> wrote in message
news:BCD75A43-705F-4384-8049-...
> I have a RadioButtonList Control and need to add attributes for javascript
> events such as onclick but can not get the attributes to render to the
page
> by using the following code:
>
> myRadioButtonList.Items(0).Attributes.Add("style", "font-bold:true")
>
> I have tried to impliment this in the Page_Load and Page_PerRender Events.
> If I try to use an out of range index, it errors out as it should.
>
> What am I missing???
>
> Thanks
>
> Earl
|