This documentation is archived and is not being maintained.

CheckBox and CheckBoxList Web Server Controls

Visual Studio .NET 2003

The CheckBox and CheckBoxList Web server controls provide a way for users to switch between true/false, yes/no, or on/off options.

Because there are two different controls, and because they function somewhat differently, it's important to understand their different purposes. You can refer to the following table to determine which topics pertain specifically to the control you want to work with.

Note   Some of the topics listed below for the CheckBoxList control do not pertain solely to that control; instead, they are topics that apply to all list Web server controls (ListBox, DropDownList, RadioButtonList, and CheckBoxList).

In This Section

Introduction to the CheckBox and CheckBoxList Web Server Controls
Explains what you can do with CheckBox and CheckBoxList controls and what the differences are between them.
Adding CheckBox Web Server Controls to a Web Forms Page
Gives directions for adding an individual CheckBox control to a page.
Adding CheckBoxList Controls to a Web Forms Page
Gives directions for adding a CheckBoxList control (rather than individual CheckBox controls) to a page.
Getting and Setting a CheckBox Web Server Control Value Programmatically
Gives directions for programmatically selecting and clearing an individual CheckBox control.
Responding to User Selection in a CheckBox Web Server Control
Gives directions for writing an event handler that responds directly when the user clicks an individual CheckBox control.
Setting Layout in a CheckBoxList Web Server Control
Gives directions for specifying how many columns of check boxes the CheckBoxList control displays and how they are ordered.

Related Sections

Adding Web Server Controls to a Web Forms Page
Gives directions for including Web server controls on your Web Forms page.
Setting ASP.NET Server Control Properties
Suggests additional topics of interest concerning server control properties.
Setting Web Server Control Properties Programmatically
Gives directions for setting Web server control properties in code.
Customizing the Appearance of ASP.NET Server Controls Using Styles
Gives directions for changing the look of Web server controls on a page.
Adding Items in a List Web Server Control
Gives directions for defining individual check boxes in the CheckBoxList control, either at design time or programmatically at run time.
Populating a List Web Server Control from a Database
Gives directions for binding a CheckBoxList control to a database in order to display bound check boxes.
Determining the Selection in a List Web Server Control
Gives directions for checking in code what the user has selected.
Setting the Selection in a List Web Server Control
Gives directions for preselecting items in a CheckBoxList control.
Responding to Changes in a List Web Server Control
Gives directions for checking in code which check box the user has clicked in a CheckBoxList control.
Show: