RadioButtonList RepeatLayout Flow
The following asp.net c# example code demonstrate us how can we use RadioButtonList control's ReapeatLayout
property value as Flow. RadioButtonList is an asp.net list web server control which populate a group of radio button controls.
RadioButtonList control's RepeatLayout property get or set a value which specify whether the list items will be rendered by using
a html 'table' element, a 'ul' element, an 'ol' element or a 'span' element.
RadioButtonList RepeatLayout property accept a value from System.Web.UI.WebControls.RepeatLayout enumeration. RepeatLayout enumeration have the following possible values Flow, OrderedList, Table and UnorderedList. RadioButtonList RepeatLayout value Flow render the list items without a table structure. So, then items render with html 'span' element and items are separated by html 'br' (break) element.
RadioButtonList RepeatLayout property accept a value from System.Web.UI.WebControls.RepeatLayout enumeration. RepeatLayout enumeration have the following possible values Flow, OrderedList, Table and UnorderedList. RadioButtonList RepeatLayout value Flow render the list items without a table structure. So, then items render with html 'span' element and items are separated by html 'br' (break) element.
RadioButtonListRepeatLayoutFlow.aspx
<%@ Page Language="C#" AutoEventWireup="true" %>
<!DOCTYPE html>
<script runat="server">
protected void Button1_Click(object sender, System.EventArgs e)
{
RadioButtonList1.RepeatLayout = RepeatLayout.Flow;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>How to use RadioButtonList RepeatLayout Flow in asp.net</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style="color:SeaGreen; font-style:italic;">
How to use RadioButtonList RepeatLayout
<br /> Flow in asp.net
</h2>
<hr width="425" align="left" color="Pink" />
<asp:RadioButtonList
ID="RadioButtonList1"
runat="server"
BorderWidth="1"
BorderColor="SkyBlue"
BorderStyle="Dotted"
Font-Names="Comic Sans MS"
ForeColor="BlueViolet"
Width="350"
RepeatColumns="2"
>
<asp:ListItem Text="BlanchedAlmond"></asp:ListItem>
<asp:ListItem Text="Yellow"></asp:ListItem>
<asp:ListItem Text="BlueViolet"></asp:ListItem>
<asp:ListItem Text="Brown"></asp:ListItem>
<asp:ListItem Text="Cyan"></asp:ListItem>
</asp:RadioButtonList>
<br />
<asp:Button
ID="Button1"
runat="server"
OnClick="Button1_Click"
Text="Set RepeatLayout Flow"
Height="45"
Font-Bold="true"
ForeColor="DodgerBlue"
/>
</div>
</form>
</body>
</html>

