InnaS InnaS - 2 months ago 5x
ASP.NET (C#) Question

Group radio buttons without list

I'm new in programming and this is my first question, I hope I did it according to the rules.
I want to place radio buttons and next to them text boxes. I understand that I can't do it with radio buttons list. Like this:
Radio Buttons on the right side of the text
What is the best way to do it and how to group them? Further I want to check which of the buttons is checked and save this information.
I will appreciate any suggestion for the correct way to do it.


Try this :

You can use the GroupName property of RadioButton to do so ...


<asp:RadioButton id="Radio1" GroupName="radio" runat="server"/>
<asp:RadioButton id="Radio2" GroupName="radio" runat="server"/>
<asp:RadioButton id="Radio3" GroupName="radio" runat="server"/>

Then you can access this RadioButtons in your code behind .

For further reference link