System.Web.UI.WebControls.CheckBox Members

The members of System.Web.UI.WebControls.CheckBox are listed below.

See Also: Inherited members from System.Web.UI.WebControls.WebControl

Public Constructors

Initializes a new instance of the System.Web.UI.WebControls.CheckBox class.

Public Properties

AutoPostBackbool.

Gets or sets a value indicating whether the System.Web.UI.WebControls.CheckBox state automatically posts back to the server when clicked.

CausesValidationbool.

Gets or sets a value indicating whether validation is performed when the System.Web.UI.WebControls.CheckBox control is selected.

Checkedbool.

Gets or sets a value indicating whether the System.Web.UI.WebControls.CheckBox control is checked.

[read-only]
InputAttributesSystem.Web.UI.AttributeCollection.

Gets a reference to the collection of attributes for the rendered input element of the System.Web.UI.WebControls.CheckBox control.

[read-only]
LabelAttributesSystem.Web.UI.AttributeCollection.

Gets a reference to the collection of attributes for the rendered LABEL element of the System.Web.UI.WebControls.CheckBox control.

Textstring.

Gets or sets the text label associated with the System.Web.UI.WebControls.CheckBox.

TextAlignTextAlign.

Gets or sets the alignment of the text label associated with the System.Web.UI.WebControls.CheckBox control.

ValidationGroupstring.

Gets or sets the group of controls for which the System.Web.UI.WebControls.CheckBox control causes validation when it posts back to the server.

Protected Methods

override
AddAttributesToRender(System.Web.UI.HtmlTextWriter)

Adds the HTML attributes and styles of a System.Web.UI.WebControls.CheckBox control to be rendered to the specified output stream.

LoadPostData(string, System.Collections.Specialized.NameValueCollection) : bool

Processes the postback data for the System.Web.UI.WebControls.CheckBox control.

override
LoadViewState(object)

Loads the previously saved view state of the System.Web.UI.WebControls.CheckBox control.

OnCheckedChanged(EventArgs)

Raises the CheckBox.CheckedChanged event of the System.Web.UI.WebControls.CheckBox control. This allows you to handle the event directly.

override
OnPreRender(EventArgs)

Registers client script for generating postback prior to rendering on the client if CheckBox.AutoPostBack is true.

RaisePostDataChangedEvent()

Invokes the CheckBox.OnCheckedChanged(EventArgs) method when the posted data for the System.Web.UI.WebControls.CheckBox control has changed.

override
Render(System.Web.UI.HtmlTextWriter)

Displays the System.Web.UI.WebControls.CheckBox on the client.

override
SaveViewState() : object

Saves the changes to the System.Web.UI.WebControls.CheckBox view state since the time the page was posted back to the server.

override
TrackViewState()

Tracks view-state changes to the System.Web.UI.WebControls.CheckBox control so that they can be stored in the control's System.Web.UI.StateBag object. This object is accessible through the System.Web.UI.Control.ViewState property.

Public Events

CheckedChanged

Occurs when the value of the CheckBox.Checked property changes between posts to the server.

Explicitly Implemented Interface Members