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

显示的样式如下:

posted @ 2013-05-18 22:46  Jerrmy  阅读(15552)  评论(1编辑  收藏  举报