• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 189
  • Last Modified:

Which Option button was selected

<asp:RadioButton GroupName="plan" ID="RB3F3" runat="server" />
<asp:RadioButton GroupName="plan" ID="RB4F2" runat="server" />
...................

In C#, how do I check which option was selected in the code-behind? thanks

0
MikeMCSD
Asked:
MikeMCSD
2 Solutions
 
divinewind80Commented:
More or less:

If(RB3F3.selected==true)
{
your code here
}
else
{
else code here
}

Sorry if the sytax is a little off... I write in VB.
0
 
surajgupthaCommented:
if (RB3F3.Checked)
{
}
if (RB4F2.Checked)
{
}

Even though they belong to the same group, they are two seperate controls and to get what is checked each has to be read seperately
0
 
MikeMCSDAuthor Commented:
thanks guys . . I prefer VB too and using C# is a rude awakening.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now