CheckBoxList and RadioButtonList Control Specify layout in ASP.Net 4
In ASP.NET 4, the CheckBoxList and RadioButtonList controls support the following new values for the RepeatLayout property:
* OrderedList – The content is rendered as li elements within an ol element.
* UnorderedList – The content is rendered as li elements within a ul element.
You can use these values like below :
<asp:CheckBoxList ID="CheckBoxList1" runat="server"
RepeatLayout="OrderedList">
<asp:ListItem Text="CheckBoxList" Value="cbl" />
</asp:CheckBoxList>
<asp:RadioButtonList ID="RadioButtonList1" runat="server"
RepeatLayout="UnorderedList">
<asp:ListItem Text="RadioButtonList" Value="rbl" />
</asp:RadioButtonList>
The HTML OutPut would be :
<ol id="CheckBoxList1">
<li> <input id="CheckBoxList1_0" type="checkbox" name="CheckBoxList1$0" value="cbl" /> <label for="CheckBoxList1_0"> CheckBoxList</label> </li>
</ol>
<ul id="RadioButtonList1">
<li> <input id="RadioButtonList1_0" type="radio" name="RadioButtonList1" value="rbl" /> <label for="RadioButtonList1_0"> RadioButtonList</label> </li>
</ul>
* OrderedList – The content is rendered as li elements within an ol element.
* UnorderedList – The content is rendered as li elements within a ul element.
You can use these values like below :
<asp:CheckBoxList ID="CheckBoxList1" runat="server"
RepeatLayout="OrderedList">
<asp:ListItem Text="CheckBoxList" Value="cbl" />
</asp:CheckBoxList>
<asp:RadioButtonList ID="RadioButtonList1" runat="server"
RepeatLayout="UnorderedList">
<asp:ListItem Text="RadioButtonList" Value="rbl" />
</asp:RadioButtonList>
The HTML OutPut would be :
<ol id="CheckBoxList1">
<li> <input id="CheckBoxList1_0" type="checkbox" name="CheckBoxList1$0" value="cbl" /> <label for="CheckBoxList1_0"> CheckBoxList</label> </li>
</ol>
<ul id="RadioButtonList1">
<li> <input id="RadioButtonList1_0" type="radio" name="RadioButtonList1" value="rbl" /> <label for="RadioButtonList1_0"> RadioButtonList</label> </li>
</ul>
This comment has been removed by the author.
ReplyDeleteivanka trump hot
ReplyDelete