asp.net.ph

CheckBox Class

System.Web.UI.WebControls Namespace


Renders a check box control.

CheckBox Class Members

Collapse   Constructors

Visibility Constructor Parameters
public CheckBox ( )

Collapse   Properties

Visibility Name Value Type Accessibility
public AutoPostBack Boolean [ Get , Set ]
public CausesValidation Boolean [ Get , Set ]
public Checked Boolean [ Get , Set ]
public InputAttributes AttributeCollection [ Get ]
public LabelAttributes AttributeCollection [ Get ]
public Text String [ Get , Set ]
public TextAlign TextAlign [ Get , Set ]
public ValidationGroup String [ Get , Set ]

Collapse   Methods

Visibility Name Parameters Return Type
protected AddAttributesToRender ( HtmlTextWriter writer ) Void
protected LoadPostData ( String postDataKey , NameValueCollection postCollection ) Boolean
protected LoadViewState ( Object savedState ) Void
protected OnCheckedChanged ( EventArgs e ) Void
protected RaisePostDataChangedEvent ( ) Void
protected SaveViewState ( ) Object
protected TrackViewState ( ) Void

Collapse   Events

Multicast Name Type
multicast CheckedChanged EventHandler

Remarks

Use the CheckBox class to create a control that allows the user to select either a true or false state.

To determine whether the control is selected, use the Checked property.

The CheckBox control provides a CheckedChanged event that is raised when the Checked property changes value between posts to the server. This allows you to define an event handler to perform a custom set of instructions each time the event is raised.

The CheckBox control does not automatically post back to the server when clicked. You must either provide another control on the Web page that supports posting to the server, such as a Button control, or set the AutoPostback property to true to automatically send the state of the control back to the server.

If you need to use multiple CheckBox controls, the CheckBoxList is an alternative control that provides convenient data binding capabilities. Individual CheckBox controls, though, provide greater control over layout.

For examples illustrating use of this control, see the individual member types of this class. For syntax information, see CheckBox in ASP.NET Syntax for Web Controls.

See Also

CheckBoxList   RadioButton   RadioButtonList Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph