CheckBox.Checked Property
.NET Framework 3.0
Gets or sets a value indicating whether the CheckBox control is checked.
Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
[ThemeableAttribute(false)] [BindableAttribute(true, BindingDirection::TwoWay)] public: virtual property bool Checked { bool get (); void set (bool value); }
/** @property */ public boolean get_Checked () /** @property */ public void set_Checked (boolean value)
public function get Checked () : boolean public function set Checked (value : boolean)
Not applicable.
Property Value
true to indicate a checked state; otherwise, false. The default is false.Use this property to determine whether the CheckBox control is checked. This property can also be used to programmatically set the state of the CheckBox control.
This property cannot be set by themes or style sheet themes. For more information, see ThemeableAttribute and Introduction to ASP.NET Themes.
| Topic | Location |
|---|---|
| How to: Set and Get the Selection in a RadioButton Web Server Control | Building ASP .NET Web Applications |
| How to: Get and Set a CheckBox Web Server Control Value Programmatically | Building ASP .NET Web Applications |
| How to: Set and Get the Selection in a RadioButton Web Server Control | Building ASP .NET Web Applications |
| How to: Get and Set a CheckBox Web Server Control Value Programmatically | Building ASP .NET Web Applications |
The following example demonstrates how to use the Checked property to determine the state of the CheckBox control.
Note: |
|---|
| The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information on the Web Forms code model, see ASP.NET Web Page Code Model. |
Community Additions
ADD
Show:
Note: