Reputation: 3126
I'm wondering if it is possible to create an ASP RadioButtonList
where the list in inline and the radio button is below the element, a label
or div
for example.
I have tried
<asp:RadioButtonList runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
<asp:ListItem Text="Label1" Value="1" Selected="True"><div class="box">stuff</div></asp:ListItem>
<asp:ListItem Text="Label2" Value="2"><div class="box">stuff</div></asp:ListItem>
<asp:ListItem Text="Label3" Value="3"><div class="box">stuff</div></asp:ListItem>
<asp:ListItem Text="Label4" Value="4"><div class="box">stuff</div></asp:ListItem>
<asp:ListItem Text="Label5" Value="5"><div class="box">stuff</div></asp:ListItem>
</asp:RadioButtonList>
But the label always comes before the div
element, whereas, I would need the div
before the label
. Any suggestions?
Upvotes: 0
Views: 492
Reputation: 50728
Well..... it's not very customizable. I would suggest using a <asp:RadioButton />
with a GroupName="YYY"
setting instead, because that would give you the control that you need, which you do not get with the list form. The RadioButton has a TextAlign that can set the text alignment in relation to the radio button, which may be helpful to your needs, but you can't set that for the list item, only the RadioButton control.
Upvotes: 1