Select the product you need help with
BUG: Radio Buttons Are Not Mutually Exclusive When Used in a Repeater Server ControlArticle ID: 316495 - View products that this article applies to. This article was previously published under Q316495 On This PageSYMPTOMS
When you add a ASP.NET RadioButton control to the ItemTemplate of a data-bound Repeater server control, the RadioButton control that you created is not mutually exclusive when you run the ASP.NET page. This problem occurs even if the GroupName attribute is set for the RadioButton controls.
CAUSE
This problem occurs because the Repeater server control implements the INamingContainer interface, which requires that all controls that are nested within it must have a unique name when rendered in Hypertext Markup Language (HTML). Therefore, the HTML name attribute of any rendered child server control is unique.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. MORE INFORMATION
HTML versions 3.2 and later require that all radio button controls that are mutually exclusive have the same unique name attribute. Because controls that are inside a bound Repeater sever control must have a unique name, the rendered HTML RadioButton control is not mutually exclusive. Note that the GroupName attribute should resolve this problem. If you set the GroupName attribute, every RadioButton control should render the same HTML name attribute that was specified by the GroupName attribute of the server control. The expected behavior does not occur because the unique client naming overrides the use of the GroupName property. Steps to Reproduce the Problem
PropertiesArticle ID: 316495 - Last Review: February 23, 2007 - Revision: 2.4
| Article Translations |


Back to the top








