RadioButtonList.RepeatLayout Proprietà

Definizione

Ottiene o imposta un valore che specifica se il rendering dell'elenco verrà eseguito usando un elemento table, un elemento ul, un elemento ol o un elemento span.

public:
 virtual property System::Web::UI::WebControls::RepeatLayout RepeatLayout { System::Web::UI::WebControls::RepeatLayout get(); void set(System::Web::UI::WebControls::RepeatLayout value); };
[System.ComponentModel.Bindable(true)]
public virtual System.Web.UI.WebControls.RepeatLayout RepeatLayout { get; set; }
public virtual System.Web.UI.WebControls.RepeatLayout RepeatLayout { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.RepeatLayout : System.Web.UI.WebControls.RepeatLayout with get, set
member this.RepeatLayout : System.Web.UI.WebControls.RepeatLayout with get, set
Public Overridable Property RepeatLayout As RepeatLayout

Valore della proprietà

RepeatLayout

Valore che specifica se il rendering dell'elenco verrà eseguito usando un elemento table, un elemento ul, un elemento ol o un elemento span. Il valore predefinito è Table.

Attributi

Eccezioni

Il layout dei pulsanti di opzione non è uno dei valori di RepeatLayout.

Esempio

Nell'esempio di codice seguente viene illustrato come utilizzare la RepeatLayout proprietà per visualizzare gli elementi di un RadioButtonList controllo in una tabella.

<%@ Page Language="C#" AutoEventWireup="True" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>RadioButtonList.RepeatLayout Example</title>
</head>
<body>

<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>
</body>
</html>
<%@ Page Language="VB" AutoEventWireup="True" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>RadioButtonList.RepeatLayout Example</title>
</head>
<body>

<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>
</body>
</html>

Commenti

Per informazioni sulle opzioni disponibili, vedere l'enumerazione RepeatLayout .

Nota

Due opzioni sono nuove a partire da ASP.NET 4: OrderedList e UnorderedList.

Alcune RepeatLayout impostazioni non consentono il layout orizzontale. Per altre informazioni, vedere l'enumerazione RepeatLayout.

Si applica a

Vedi anche