JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Immediate Solutions: Using the CheckBox Class

Checkboxes display checkmarks that allow the user to toggle a True or False condition. Here is the class hierarchy of the CheckBox class:

Object
   Control
      WebControl
         CheckBox

You can find the notable public properties of CheckBox objects in Table 16.1, the notable public methods in Table 16.2, and the notable public events in Table 16.3. Note that as with other Web server controls, I am not listing the notable properties, methods, and events this class inherits from the Control and WebControl classes—you can find them in Chapter 15, Tables 15.1 to 15.5.

Table 16.1: Noteworthy public properties of CheckBox objects.

Property

Means

AutoPostBack

Gets/sets whether the checkbox automatically posts the page back to the server.

Checked

Gets/sets whether the checkbox displays a check.

Text

Gets/sets the text caption for the checkbox.

TextAlign

Gets/sets the alignment of the text caption.

Table 16.2: Noteworthy public methods of CheckBox objects.

Method

Means

DataBind

Binds the checkbox to a data source.

Dispose

Disposes of the checkbox control.

Table 16.3: Noteworthy public events of CheckBox objects.

Event

Means

CheckedChanged

Occurs when the Checked property changes.

Load

Occurs when the checkbox is loaded.

Unload

Occurs when the checkbox is unloaded.

Previous Section Next Section




JavaScript Editor Free JavaScript Editor     JavaScript Editor