public HtmlGenericControl fieldset = new HtmlGenericControl("fieldset");
public HtmlGenericControl legend = new HtmlGenericControl("legend");
String[] options = ListString.Split(',');
for (int i = 0; i < options.Length; i++)
{
RadioButton aRadioButton = new RadioButton();
aRadioButton.Text = options[i];
fieldset.Controls.Add(aRadioButton);
}
fieldset.Controls.add(legend)
Yet when the radio list appears on my page, multiple radio buttons are selectable. How do I restrict the selection limit to 1?
Try this:
Each
RadioButtonmust be in a group so that it knows when to deselect the others from the same group.