Working with the CheckBoxList Control

The CheckBoxList control renders a list of check boxes, which can be rendered horizontally or vertically. Unlike the other List controls, a user always can select multiple items when using a CheckBoxList control.

For example, the page in Listing 10.13 contains a CheckBoxList control that renders its list items in two columns (see Figure 10.12).

Figure 10.12. Displaying list items with the CheckBoxList control.

image

Listing 10.13. ShowCheckBoxList.aspx

images

When you click the Submit button, the values of the Text ...

Get ASP.NET 4 Unleashed 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.