Reputation: 5947
I have a Checkboxlist in my page as follows.
As you can see, the 2 checkboxes are aligned one below the other. Is it possible to bring the 2 on a single line? The design code for this is as follows.
<td>
<asp:Label runat="server" ID="Label1" Text="Employer Type"></asp:Label>
</td>
<td valign="middle">
<asp:CheckBoxList ID="chkEmployerType" runat="server">
<asp:ListItem Value="E" Text="Employer"></asp:ListItem>
<asp:ListItem Value="O" Text="OJT Provider"></asp:ListItem>
</asp:CheckBoxList>
</td>
Upvotes: 0
Views: 1530
Reputation: 17614
You need to use RepeatDirection
property as following
RepeatDirection="Horizontal"
It creates ul
and li
for displaying item. You can define css
rule do display as you like.
Upvotes: 0
Reputation: 1148
write this
<asp:Label runat="server" ID="Label1" Text="Employer Type"></asp:Label>
</td>
<td valign="middle">
<asp:CheckBoxList ID="chkEmployerType" runat="server" RepeatDirection="Horizontal">
<asp:ListItem Value="E" Text="Employer"></asp:ListItem>
<asp:ListItem Value="O" Text="OJT Provider"></asp:ListItem>
</asp:CheckBoxList>
</td>
Upvotes: 2