Click here to Skip to main content
11,705,610 members (45,354 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: .NET
MY question is


IF we have four radio buttens lyk
1
2
3
4
ok,in that my answer is 2 is right option.when i click 2 it give the true , rest of three buttons are false
Posted 14-Feb-13 21:21pm
Comments
lee gee at 15-Feb-13 3:26am
   
What is your question?
ahmedfaruk88 at 15-Feb-13 3:36am
   
Please can u clearly explain in a more clear format what you really want done
Nandakishorerao at 15-Feb-13 3:44am
   
use radiobutton list.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

This is not how CP usually works. Most important goal here is to learn and help learning.
You are supposed to try it on your own, and come here when you got stuck with something, with a concrete question about your code, design, etc. Please have a look to What have you tried?[^] to see a good explanation about what I mean. If we give you a ready-to-go solution, it is not going to help you.

On the other hand, you should explain your scenario witha bit more details. You are not telling in which programming language. Is it web? Desktop? VB.Net, ASP.Net C#, C++, a Windows Form?

As final tip, a quick search on the net can give you the solutions. You can have a look to these links as a start point:

Documentation of control/class Radio button:
http://msdn.microsoft.com/en-us/library/8k52wyw2.aspx[^]
http://msdn.microsoft.com/en-us/library/system.windows.forms.radiobutton.aspx[^]


How to do them dynamically:
http://www.c-sharpcorner.com/uploadfile/mahesh/radio-button-in-C-Sharp/[^]

How to check which one is selected:
http://stackoverflow.com/questions/1797907/which-radio-button-in-the-group-is-checked[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi,
its very simple.
take a label hidden besides the individual radio buttons. Text for the label is "True" or "False" taken from database or wherever you can find the answers. So, on choosing the radio button, just show the label next to the button.

hope it helps.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

If i may guess help you to guess what you are trying to express.
try this
if (radiobutton2.Checked)
{
    radiobutton1.Enabled = false;
    radiobutton3.Enabled = false;
    radiobutton4.Enabled = false;
}

Hope this will solve your problem
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 229
1 Sergey Alexandrovich Kryukov 100
2 Inimicos 60
3 ProgramFOX 50
4 Richard MacCutchan 45
0 OriginalGriff 9,053
1 Sergey Alexandrovich Kryukov 8,347
2 CPallini 5,189
3 Maciej Los 4,726
4 Mika Wendelius 3,626


Advertise | Privacy | Mobile
Web01 | 2.8.150819.1 | Last Updated 15 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100