Export (0) Print
Expand All
Expand Minimize

RepeatLayout Enumeration

Specifies the layout of items in a list control.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

type RepeatLayout

Member nameDescription
FlowItems are displayed without a table structure. Rendered markup consists of a span element and items are separated by br elements.

The following example shows markup that is rendered for a CheckBoxList control whose RepeatLayout property is set to Flow.

<span id="ctl00_MainContent_CheckBoxList1">
  <input id="ctl00_MainContent_CheckBoxList1_0" type="checkbox" 
    name="ctl00$MainContent$CheckBoxList1$0" value="Item 1" />
  <label for="ctl00_MainContent_CheckBoxList1_0">Item 1</label>
  <br />
  <input id="ctl00_MainContent_CheckBoxList1_1" type="checkbox"
    name="ctl00$MainContent$CheckBoxList1$1" value="Item 2"/>
  <label for="ctl00_MainContent_CheckBoxList1_1">Item 2</label>
  <br />
  <input id="ctl00_MainContent_CheckBoxList1_2" type="checkbox"
    name="ctl00$MainContent$CheckBoxList1$2" value="Item 2" />
  <label for="ctl00_MainContent_CheckBoxList1_2">Item 2</label>
</span>
OrderedListItems are displayed without a table structure. Rendered markup consists of an ol element that contains li elements.

The following example shows markup that is rendered for a CheckBoxList control whose RepeatLayout property is set to OrderedList.

<ol id="ctl00_MainContent_CheckBoxList3">
  <li>
    <input id="ctl00_MainContent_CheckBoxList3_0" type="checkbox"
      name="ctl00$MainContent$CheckBoxList3$0" value="Item 1" />
    <label for="ctl00_MainContent_CheckBoxList3_0">Item 1</label>
  </li>
  <li>
    <input id="ctl00_MainContent_CheckBoxList3_1" type="checkbox"
      name="ctl00$MainContent$CheckBoxList3$1" value="Item 2" />
    <label for="ctl00_MainContent_CheckBoxList3_1">Item 2</label>
  </li>
  <li>
    <input id="ctl00_MainContent_CheckBoxList3_2" type="checkbox"
      name="ctl00$MainContent$CheckBoxList3$2" value="Item 2" />
    <label for="ctl00_MainContent_CheckBoxList3_2">Item 2</label>
  </li>
</ol>
NoteNote

This field is new as of ASP.NET 4 and is a valid option only for the CheckBoxList and RadioButtonList controls.

TableItems are displayed in a table.

The following example shows markup that is rendered for a CheckBoxList control whose RepeatLayout property is set to Table.

NoteNote

This option causes the control to render HTML that might not conform to accessibility standards. For more information, see Accessibility in Visual Studio and ASP.NET.

<table id="ctl00_MainContent_CheckBoxList2">
  <tr>
    <td>
      <input id="ctl00_MainContent_CheckBoxList2_0" type="checkbox"
        name="ctl00$MainContent$CheckBoxList2$0" value="Item 1" />
      <label for="ctl00_MainContent_CheckBoxList2_0">Item 1</label>
    </td>
  </tr>
  <tr>
    <td>
      <input id="ctl00_MainContent_CheckBoxList2_1" type="checkbox"
        name="ctl00$MainContent$CheckBoxList2$1" value="Item 2" />
      <label for="ctl00_MainContent_CheckBoxList2_1">Item 2</label>
    </td>
  </tr>
  <tr>
    <td>
      <input id="ctl00_MainContent_CheckBoxList2_2" type="checkbox"
        name="ctl00$MainContent$CheckBoxList2$2" value="Item 3" />
      <label for="ctl00_MainContent_CheckBoxList2_2">Item 3</label>
    </td>
  </tr>
</table>
UnorderedListItems are displayed without a table structure. Rendered markup consists of a ul element that contains li elements.

The following example shows markup that is rendered for a CheckBoxList control whose RepeatLayout property is set to UnorderedList.

<ul id="ctl00_MainContent_CheckBoxList4">
  <li>
    <input id="ctl00_MainContent_CheckBoxList4_0" type="checkbox"
      name="ctl00$MainContent$CheckBoxList4$0" value="Item 1" />
    <label for="ctl00_MainContent_CheckBoxList4_0">Item 1</label>
  </li>
  <li>
    <input id="ctl00_MainContent_CheckBoxList4_1" type="checkbox"
      name="ctl00$MainContent$CheckBoxList4$1" value="Item 2" />
    <label for="ctl00_MainContent_CheckBoxList4_1">Item 2</label>
  </li>
  <li>
    <input id="ctl00_MainContent_CheckBoxList4_2" type="checkbox"
      name="ctl00$MainContent$CheckBoxList4$2" value="Item 2" />
    <label for="ctl00_MainContent_CheckBoxList4_2">Item 2</label>
  </li>
</ul>
NoteNote

This field is new as of ASP.NET 4 and is a valid option only for the CheckBoxList and RadioButtonList controls.

The RepeatLayout enumeration represents the different layout options for a list control.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft