如何让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