How to: Add CheckBoxList Web Server Controls to a Web Forms Page
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

How to: Add CheckBoxList Web Server Controls to a Web Forms Page

When you use a CheckBoxList control, you add a single control to the page. Adding items to the control is a separate process that depends on whether you will display a static list in the control or display a list that is generated dynamically at run time.

NoteNote

The procedure for working with individual CheckBox Web server controls is different. For details, see How to: Add CheckBox Web Server Controls to a Web Forms Page.

To add a CheckBoxList Web server control to a Web Forms page

  1. Add an <asp:CheckBoxList> element to the page. For syntax, see CheckBoxList Web Server Control Declarative Syntax.

  2. Optionally, change the orientation of the caption by setting the TextAlign property.

  3. Optionally, change the RepeatLayout, RepeatColumns, RepeatDirection property to specify whether the control displays multiple columns.

  4. Create items for the control in one of these ways:

See Also

Show:
© 2016 Microsoft