<CheckBox>

The CheckBox tag renders as a checkbox and associated label at run-time. A series of CheckBox controls provides a useful alternative to the CheckBoxList. With the CheckBoxList, all selected values are placed into a single string value that is sent to the data source. However, a series of individual CheckBox controls provides you with the same basic functionality as the CheckBoxList, but you also have the ability to store the value of each CheckBox in its own data field.

Syntax

<CheckBox
    AccessKey="string"
    BackColor="color name|#dddddd"
    BorderColor="color name|#dddddd"
    BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge| Inset|Outset"
    BorderWidth="size"
    Checked="True|False"
    CssClass="string"
    DataField="string"
    DataType="Boolean"
    DataValueField="string"
    Font-Bold="True|False"
    Font-Italic="True|False"
    Font-Names="string"
    Font-Overline="True|False"
    Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium| Large|X-Large|XX-Large"
    Font-Strikeout="True|False"
    Font-Underline="True|False"
    ForeColor="color name|#dddddd"
    Height="size"
    ID="string"
    Nullable="True|False"

    Style="string"
    TabIndex="integer"
    Text="string"
    TextAlign="Left|Right"
    ToolTip="string"
    Visible="True|False"
    Width="size"

/>

Remarks

Back to top

Example

<addform>
  ...
  <table>
    <tr>
       <td>
        <label target="txtFirstName" text="First Name" />
        <textbox id="txtFirstName" datafield="FirstName" datatype="string" />
      </td>
    </tr>
    <tr>
      <td>
        
<checkbox id="chkAgree" datafield="AgreeToTerms" datatype="boolean" text="I agree to be bound by the terms of the contract"/> 
      </td>
    </tr>
    <tr>
      <td colspan="2">
        <addbutton text="Add"/> <cancelbutton text="Cancel"/>
      </td>
    </tr>
  </table>
</addform>
Back to top