RadioButtonList ASP.NET Server Control

The RadioButtonList control's programmatic functionality is nearly identical to the CheckBoxList, but its functionality is different. When rendered, each item from the RadioButtonList.DataSource will be part of a group of RadioButton controls and only one RadioButton out of the group can ever be selected at one time.

The RadioButtonList is part of the List controls suite, so its behavior is the same as the proceeding List controls as far as how you enable automatic post back (AutoPostBack), how you tell if an item is checked (ListItem.Selected), and how to handle the SelectedIndexChanged on the post back. So, not to sound redundant, I will be jumping right into the code example. Listing 8.22 illustrates ...

Get Programming Data-Driven Web Applications with ASP.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.