CodeCharge Studio All ASP PHP Perl ColdFusion Java C#.NET VB.NET

Checkbox Control Reference

Design-Time Properties

Property Description
Name The name of the control.
Visible Specify whether the control should be displayed or not.
Control Source Type The type of data source that will provide data for the control: Database Column, Code Expression.
Control Source Specify the source of data for the control e.g. the name of a database column.
Data Type The type of data that will be contained in the control.
Checked Value The value submitted by a Checkbox Control when it is checked.
Unchecked Value The value submitted by a Checkbox Control when it is unchecked.
Default Value Specify a default value to be used for the control if no value is otherwise specified.
Error Control Specify the name of a control that will be used to display any error messages pertaining to this control.
Validation Rule Specify an expression that will be used to check the validity of the data entered in the control.
Validation Text Specify the text that will be displayed if the data entered in the control does not meet the validation rule.

Events

Event Description
Server Side Events
Before Show This event occurs before a component is rendered to the page.
Client Side Events
On Load Used for binding Validation rules to the control.

Run-Time Properties (ASP)

Property Description
Errors An object that contains the error messages generated during script execution when submitted data fails verification or any other user defined condition is not fulfilled.
Value Holds a value of the control.
Visible This property determines whether the control is to be shown (parsed into template) or not.
State Returns a value that describes the state of the object.

Run-Time Properties (PHP)

Property Description
Errors An object that contains the error messages generated during script execution when submitted data fails verification or any other user defined condition is not fulfilled.
ComponentType Specifies type of an object, such as "TextBox", "Record", etc.
Parent Specifies parent container of an object, for example a record form for a textbox that is included within that form.
Visible This property determines whether the control is to be shown (parsed into template) or not.

Run-Time Properties (.NET)

Interface The System.Web.UI.WebControls.Checkbox is used
Property Description
Visible Gets or sets a value that indicates whether a server control is rendered as UI on the page.
Checked Gets or sets a value indicating whether the CheckBox control is checked. See .NET Framework SDK reference.
Model Layer
Property Description
<control name> Contains current value of control.
<control name>CheckedValue Contains checked value of control.
<control name>UncheckedValue Contains unchecked value of control.

Methods (PHP)

Method Description
GetValue Retrieves the value of the CheckBox control.
SetValue Sets the value for the CheckBox control.

Methods (Servlets & JSP)

MethodDescription
getPage Get the page that contains this control.
setValue This method sets the value for the control.
hasErrors Whether the control has (validation) errors.
addError Add error description to errors collection.
getErrorsAsString Get all errors formatted as String, separated by &lt;br&gt; elements.
isVisible Whether this control should be shown.
setVisible Specify whether this control or component should be shown.
getParent Get the parent component that contains this control or component.

Run-Time Variables (CF,CFT)

Variable Description
fld<control name> Holds the value of the control.
hide<control name> This variable determines whether the control is to be shown or not.

See also

Checkbox Overview


On-line, printable versions and updates