ASP NET - CheckBox e CheckBoxList

CheckBox


CheckBoxList-RepeatLayout="Flow"



CheckBoxList-RepeatLayout="OrderedList"

CheckBoxList-RepeatLayout="Table"

CheckBoxList-RepeatLayout="UnorderedList"

Importante : Os itens podem ser clicados e desclicados independentemente um dos doutros.

No RepeatLayout="Flow" o parâmetro RepeatColumns="2" exibe 2 itens em cada linha.

Os parâmetros CellPadding="15" e CellSpacing="15" parece só funcionar em RepeatLayout="Table"


Código:

        <form id="form1" runat="server">
            <div>
                <h3>CheckBox</h3>
                <div>
                    <asp:CheckBox ID="CheckBox1" runat="server" Text="CheckBox Sózinho" />
                </div>

                <hr />

                <h3>CheckBoxList-RepeatLayout="Flow"</h3>
                <div>
                    <asp:CheckBoxList ID="CheckBoxList1" runat="server"
                        CellPadding="5"
                        CellSpacing="5"
                        RepeatColumns="2"
                        RepeatDirection="Vertical"
                        RepeatLayout="Flow"
                        TextAlign="Right"
                        >
                        <asp:ListItem Text="Texto Item 1" Value="Valor Item 1">Item 1</asp:ListItem>
                        <asp:ListItem Text="Texto Item 2" Value="Valor Item 2">Item 2</asp:ListItem>
                        <asp:ListItem Text="Texto Item 3" Value="Valor Item 3">Item 3</asp:ListItem>
                        <asp:ListItem Text="Texto Item 4" Value="Valor Item 4">Item 4</asp:ListItem>
                        <asp:ListItem Text="Texto Item 5" Value="Valor Item 5">Item 5</asp:ListItem>
                        <asp:ListItem Text="Texto Item 6" Value="Valor Item 6">Item 6</asp:ListItem>
                    </asp:CheckBoxList>
                </div>


                <h3>CheckBoxList-RepeatLayout="OrderedList"</h3>
                <div>
                    <asp:CheckBoxList ID="CheckBoxList2" runat="server"
                        CellPadding="5"
                        CellSpacing="5"
                        RepeatDirection="Vertical"
                        RepeatLayout="OrderedList"
                        TextAlign="Right"
                        >
                        <asp:ListItem Text="Texto Item 1" Value="Valor Item 1">Item 1</asp:ListItem>
                        <asp:ListItem Text="Texto Item 2" Value="Valor Item 2">Item 2</asp:ListItem>
                        <asp:ListItem Text="Texto Item 3" Value="Valor Item 3">Item 3</asp:ListItem>
                        <asp:ListItem Text="Texto Item 4" Value="Valor Item 4">Item 4</asp:ListItem>
                        <asp:ListItem Text="Texto Item 5" Value="Valor Item 5">Item 5</asp:ListItem>
                        <asp:ListItem Text="Texto Item 6" Value="Valor Item 6">Item 6</asp:ListItem>
                    </asp:CheckBoxList>
                </div>

                <h3>CheckBoxList-RepeatLayout="Table"</h3>
                <div>
                    <asp:CheckBoxList ID="CheckBoxList3" runat="server"
                        CellPadding="5"
                        CellSpacing="5"
                        RepeatDirection="Vertical"
                        RepeatLayout="Table"
                        TextAlign="Right"
                        >
                        <asp:ListItem Text="Texto Item 1" Value="Valor Item 1">Item 1</asp:ListItem>
                        <asp:ListItem Text="Texto Item 2" Value="Valor Item 2">Item 2</asp:ListItem>
                        <asp:ListItem Text="Texto Item 3" Value="Valor Item 3">Item 3</asp:ListItem>
                        <asp:ListItem Text="Texto Item 4" Value="Valor Item 4">Item 4</asp:ListItem>
                        <asp:ListItem Text="Texto Item 5" Value="Valor Item 5">Item 5</asp:ListItem>
                        <asp:ListItem Text="Texto Item 6" Value="Valor Item 6">Item 6</asp:ListItem>
                    </asp:CheckBoxList>
                </div>


                <h3>CheckBoxList-RepeatLayout="UnorderedList"</h3>
                <div>
                    <asp:CheckBoxList ID="CheckBoxList4" runat="server"
                        CellPadding="5"
                        CellSpacing="5"
                        RepeatDirection="Vertical"
                        RepeatLayout="UnorderedList"
                        TextAlign="Right"
                        >
                        <asp:ListItem Text="Texto Item 1" Value="Valor Item 1">Item 1</asp:ListItem>
                        <asp:ListItem Text="Texto Item 2" Value="Valor Item 2">Item 2</asp:ListItem>
                        <asp:ListItem Text="Texto Item 3" Value="Valor Item 3">Item 3</asp:ListItem>
                        <asp:ListItem Text="Texto Item 4" Value="Valor Item 4">Item 4</asp:ListItem>
                        <asp:ListItem Text="Texto Item 5" Value="Valor Item 5">Item 5</asp:ListItem>
                        <asp:ListItem Text="Texto Item 6" Value="Valor Item 6">Item 6</asp:ListItem>
                    </asp:CheckBoxList>
                </div>


                <p>
                    Importante : Os itens podem ser clicados e desclicados independentemente um dos doutros.
                </p>
                <p>
                    No RepeatLayout="Flow" o parâmetro RepeatColumns="2" exibe 2 itens em cada linha.
                </p>
                <p>
                    Os parâmetros CellPadding="15" e CellSpacing="15" parece só funcionar em RepeatLayout="Table"

                </p>