Displays a check box that allows the user to select a true or false condition in mobile web browsers

CheckBox control inherits Microsoft's CheckBox documented here.

Namespace: FiftyOne.Framework.Mobile.Controls
Assembly: FiftyOne.Framework (in FiftyOne.Framework.dll) Version: 2.0.2.1 (2.0.2.1)

Syntax

C#
[ControlValuePropertyAttribute("Checked")]
[DefaultPropertyAttribute("Text")]
[ToolboxBitmapAttribute("FiftyOne.Framework.Mobile.Controls.CheckBox")]
[DefaultEventAttribute("CheckedChanged")]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class CheckBox : CheckBox, IStyle, 
	IUrlResolutionService, IAutoPostBackControl, IControlSize, ICssIncludeGroup, IMobileProfileControl
Visual Basic
<ControlValuePropertyAttribute("Checked")> _
<DefaultPropertyAttribute("Text")> _
<ToolboxBitmapAttribute("FiftyOne.Framework.Mobile.Controls.CheckBox")> _
<DefaultEventAttribute("CheckedChanged")> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public Class CheckBox _
	Inherits CheckBox _
	Implements IStyle, IUrlResolutionService, IAutoPostBackControl, IControlSize,  _
	ICssIncludeGroup, IMobileProfileControl
Visual C++
[ControlValuePropertyAttribute(L"Checked")]
[DefaultPropertyAttribute(L"Text")]
[ToolboxBitmapAttribute(L"FiftyOne.Framework.Mobile.Controls.CheckBox")]
[DefaultEventAttribute(L"CheckedChanged")]
[AspNetHostingPermissionAttribute(SecurityAction::InheritanceDemand, Level = AspNetHostingPermissionLevel::Minimal)]
public ref class CheckBox : public CheckBox, 
	IStyle, IUrlResolutionService, IAutoPostBackControl, IControlSize, ICssIncludeGroup, 
	IMobileProfileControl

Examples

The following example demonstrates how to use a CheckBox control.

CopyXML
<mob:CheckBox ID="CheckBox1" runat="server" Text="Chess" OnCheckedChanged="CheckBox1_CheckedChanged"
    AutoPostBack="true" AutoSize="false">
    <EnabledAutoPostBackImage>
        <mob:AltImage ImageUrl="~/Images/Regular/16x16/Navigation Blue Right.jpg" />
        <mob:AltImage ImageUrl="~/Images/Regular/24x24/Navigation Blue Right.png" />
        <mob:AltImage ImageUrl="~/Images/Regular/32x32/Navigation Blue Right.jpg" />
        <mob:AltImage ImageUrl="~/Images/Regular/48x48/Navigation Blue Right.png" />
        <mob:AltImage ImageUrl="~/Images/Regular/72x72/Navigation Blue Right.gif" />
    </EnabledAutoPostBackImage>
</mob:CheckBox>
<mob:CheckBox ID="CheckBox2" runat="server" Text="Cricket" OnCheckedChanged="CheckBox2_CheckedChanged"
    AutoPostBack="true" />
<mob:Label id="Message1" runat="server" />  
<mob:Label id="Message2" runat="server" />
CopyC#
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
    if(CheckBox1.Checked)
        lbl1.Text = "You Have Interested In Chess";            
}
protected void CheckBox2_CheckedChanged(object sender, EventArgs e)
{
    if (CheckBox2.Checked)
        lbl2.Text = "You Have Interested In Cricket";
}

Inheritance Hierarchy

System..::..Object
  System.Web.UI..::..Control
    System.Web.UI.WebControls..::..WebControl
      System.Web.UI.WebControls..::..CheckBox
        FiftyOne.Framework.Mobile.Controls..::..CheckBox

See Also