To set the field’s label using the LabelText’s property.
CheckboxList is a databindable control. Bind it to fill the control, use DataTextField / DataValueField / DataNameField
If you want a horizontal layout, set DataType property to Horizontal.
Code:
<mob:MobilePage ID="mbPage1" runat="server"> <Header> <h1>Checkboxes example</h1> </Header> <Content> <p> <h2>Simple checkboxlist</h2> <mob:CheckboxList ID="cbCars" DataNameField="Name" DataTextField="Name" DataValueField="Name" Text="Choose a car" runat="server"></mob:CheckboxList> </p> <p> <h2>Simple checkboxlist with a Horizontal layout.</h2> Set DataType="Horizontal". <mob:CheckboxList ID="cbCars2" DataType="Horizontal" DataNameField="Name" DataTextField="Name" DataValueField="Name" Text="Choose a car" runat="server"></mob:CheckboxList> </p> </Content> <Footer> <h1>Footer</h1> </Footer> </mob:MobilePage>
Result:
