This documentation is archived and is not being maintained.

RadioButtonList.RepeatLayout Property

Gets or sets the layout of radio buttons within the group.

[Visual Basic]
Public Overridable Property RepeatLayout As RepeatLayout
[C#]
public virtual RepeatLayout RepeatLayout {get; set;}
[C++]
public: __property virtual RepeatLayout get_RepeatLayout();
public: __property virtual void set_RepeatLayout(RepeatLayout);
[JScript]
public function get RepeatLayout() : RepeatLayout;
public function set RepeatLayout(RepeatLayout);

Property Value

One of the RepeatLayout values. The default is Table.

Exceptions

Exception Type Condition
ArgumentException The radio buttons layout is not one of the RepeatLayout values.

Remarks

Use this property to specify whether the items in the RadioButtonList control are displayed in a table. If this property is set to RepeatLayout.Table, the items in the list are displayed in a table. If this property is set to RepeatLayout.Flow, the items in the list are displayed without a table structure.

Example

[Visual Basic, C#, JScript] The following example demonstrates how to use the RepeatLayout property to display the items of a RadioButtonList in a table.

[Visual Basic] 
<%@ Page Language="VB" AutoEventWireup="True" %>

<asp:RadioButtonList id=RadioButtonList1
      RepeatColumns="2"
      RepeatDirection="Vertical"
      RepeatLayout="Table"  
      runat="server">
 
    <asp:ListItem>Item 1</asp:ListItem>
    <asp:ListItem>Item 2</asp:ListItem>
    <asp:ListItem>Item 3</asp:ListItem>
    <asp:ListItem>Item 4</asp:ListItem>
    <asp:ListItem>Item 5</asp:ListItem>
    <asp:ListItem>Item 6</asp:ListItem>
 
 </asp:RadioButtonList>


[C#] 
<%@ Page Language="C#" AutoEventWireup="True" %>

<asp:RadioButtonList id=RadioButtonList1
      RepeatColumns="2"
      RepeatDirection="Vertical"
      RepeatLayout="Table"  
      runat="server">
 
    <asp:ListItem>Item 1</asp:ListItem>
    <asp:ListItem>Item 2</asp:ListItem>
    <asp:ListItem>Item 3</asp:ListItem>
    <asp:ListItem>Item 4</asp:ListItem>
    <asp:ListItem>Item 5</asp:ListItem>
    <asp:ListItem>Item 6</asp:ListItem>
 
 </asp:RadioButtonList>


[JScript] 
<%@ Page Language="JScript" AutoEventWireup="True" %>

<asp:RadioButtonList id=RadioButtonList1
      RepeatColumns="2"
      RepeatDirection="Vertical"
      RepeatLayout="Table"  
      runat="server">
 
    <asp:ListItem>Item 1</asp:ListItem>
    <asp:ListItem>Item 2</asp:ListItem>
    <asp:ListItem>Item 3</asp:ListItem>
    <asp:ListItem>Item 4</asp:ListItem>
    <asp:ListItem>Item 5</asp:ListItem>
    <asp:ListItem>Item 6</asp:ListItem>
 
 </asp:RadioButtonList>

[C++] No example is available for C++. To view a Visual Basic, C#, or JScript example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

RadioButtonList Class | RadioButtonList Members | System.Web.UI.WebControls Namespace | RepeatLayout

Show: