RadioButtonList.RepeatLayout Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan atau menetapkan nilai yang menentukan apakah daftar akan dirender dengan menggunakan table elemen, ul elemen, ol elemen, atau span elemen.
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
Nilai Properti
Nilai yang menentukan apakah daftar akan dirender dengan menggunakan table elemen, ul elemen, ol elemen, atau span elemen. Default adalah Table.
- Atribut
Pengecualian
Tata letak tombol radio bukan salah RepeatLayout satu nilai.
Contoh
Contoh kode berikut menunjukkan cara menggunakan RepeatLayout properti untuk menampilkan item RadioButtonList kontrol dalam tabel.
<%@ 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>
Keterangan
Untuk informasi tentang opsi yang tersedia, lihat RepeatLayout enumerasi.
Catatan
Dua opsi baru pada ASP.NET 4: OrderedList dan UnorderedList.
Beberapa RepeatLayout pengaturan tidak memperbolehkan tata letak horizontal. Untuk informasi selengkapnya, lihat enumerasi RepeatLayout.