如何讓CheckBoxList橫着顯示


默認情況下,RadioButtonList、CheckBoxList 的各項是一行一個,豎着顯示的,如何讓其橫着顯示呢,設置 RepeatDirection 為 RepeatDirection.Horizontal就可以達到想要的結果。

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <fieldset>
    <legend>系統管理</legend>
        <asp:CheckBoxList ID="cblSystem" runat="server" AutoPostBack="false" 
            RepeatColumns="4" RepeatDirection="Horizontal">
        </asp:CheckBoxList>
    </fieldset>
    <div>
</body>
</html>

顯示的樣式如下:


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM