Latest web development tutorials

ASP.NET CheckBoxList RepeatDirection 屬性

CheckBoxList 控件 CheckBoxList控件

定義和用法

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>

演示實例»

CheckBoxList 控件 CheckBoxList控件