Controls You Can Use on Web Forms ASP.NET Standard Controls CheckBox and CheckBoxList Controls
By default, the CheckBoxList control displays a single column of check boxes. However, you can specify any number of columns, and within the columns, you can specify how the items are ordered: vertically ( the default ) or horizontally. Vertical layout in three columns results in a layout such as the following:
A D G
B E H
C F
Horizontal layout for the same items results in the following layout:
A B C
D E F
G H
- Set the CheckBoxList control’s RepeatColumns property to the number of columns you want.
- Set the RepeatDirection property to Vertical or Horizontal. If you are setting the property in code, use the RepeatDirection enumeration, as shown in the following example:
myList.RepeatDirection = RepeatDirection.Horizontal;
myList.RepeatDirection = RepeatDirection.Horizontal |
|
C# |
VB |
Adding Items in a List Control Determining the Selection in a List Control Setting the Selection in a List Control
|