InnaS InnaS - 1 year ago 93
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.

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download