Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do i have vertical align when i am using <asp:RadioButton> I cannot use radiobuttonList because i need to have an id for each Radio button.

<asp:RadioButton ID="Question1_Option1" Text="" runat="server" GroupName="GroupQuestion1"/>
<asp:RadioButton ID="Question1_Option2" Text="" runat="server" GroupName="GroupQuestion1"/>
<asp:RadioButton ID="Question1_Option3" Text="" runat="server" GroupName="GroupQuestion1"/>

Kindly guide me
Posted

The best way to do this is by using ordered list
HTML
<ol></ol>
or unordered list
HTML
<ul></ul>


Place all your radio buttons in a li tag of an ul. like this.

ASP.NET
<ul>
<li>
<asp:radiobutton id="Question1_Option1" text="" runat="server" groupname="GroupQuestion1" xmlns:asp="#unknown" />
</li>
<li>
<asp:radiobutton id="Question1_Option2" text="" runat="server" groupname="GroupQuestion1" xmlns:asp="#unknown" />
</li>
<li>
<asp:radiobutton id="Question1_Option3" text="" runat="server" groupname="GroupQuestion1" xmlns:asp="#unknown" />
</li>
</ul>
 
Share this answer
 
You can do it by using css.

Plenty of options are available here.[^].

-KR
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900