dd

ASP.NET CheckBoxList RepeatDirection 属性


定义和用法

RepeatDirection 属性用于获取或设置 CheckBoxList 中的项目垂直显示还是水平显示。

语法

<asp:CheckBoxList RepeatDirection="mode" runat="server">
Some Content
</asp:CheckBoxList >


属性描述
mode规定 CheckBoxList 中项目的布局方向。

可能的值:

  • Horizontal - 项目水平显示。
  • Vertical - 默认。项目垂直显示。

实例

下面的实例设置了 CheckBoxList 控件的 RepeatDirection:

<form runat="server">
<asp:CheckBoxList id="cb1" runat="server"
RepeatDirection="Horizontal">

Some content

</asp:CheckBoxList>
</form>