ASP.NET RadioButtonList RepeatDirection 屬性


RadioButtonList 控件 RadioButtonList 控件

定義和用法

RepeatDirection 屬性用於獲取或設置 RadioButtonList 中的專案是垂直顯示還是水準顯示。

語法

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

屬性 描述
mode 規定 RadioButtonList 中專案的佈局方向。

可能的值:

  • Horizontal - 專案水準顯示
  • Vertical - 默認。專案垂直顯示


實例

下麵的實例設置了 RadioButtonList 控件的 RepeatDirection:

<form runat="server">
<asp:RadioButtonList id="rb1"
runat="server" RepeatDirection="Horizontal">

Some content

</asp:RadioButtonList>
</form>


RadioButtonList 控件 RadioButtonList 控件