0

I have a Checkboxlist in my page as follows.

enter image description here

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>

3 Answers 3

2

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>
Sign up to request clarification or add additional context in comments.

Comments

1

Set RepeatDirection property of CheckBoxList to Horizontal

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.