Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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

You can add a check box to a Web Forms page in two ways:

  • By adding an individual CheckBox Web server control.

  • By adding a CheckBoxList Web server control and then adding individual list items to the control.

    NoteNote

    This topic addresses how to add individual CheckBox controls to the page. For information about adding items to a CheckBoxList control, see How to: Add Items in List Web Server Controls.

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

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

  2. Specify a caption by setting the Text property.

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

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.