Using the CheckBox Web Control

In the “User Input Classifications” section at the beginning of this hour, we examined three different classes of user input. The most restrictive class of user input was the Yes/No input class, which is Boolean input, which can be answered in only one of two ways, like Yes/No, Male/Female, and so on. The checkbox is an ideal candidate for collecting user input that falls into this category. The checkbox, as you've no doubt seen in use before, is a square box that can be checked or unchecked.

Checkboxes can also be used for presenting a list of options from which the user can select multiple choices. For example, in our previous two examples—DropDownList.aspx and RadioButton.aspx—a user can select only one of three ...

Get SAMS Teach Yourself ASP.NET in 24 Hours now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.