• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 195
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

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