473,326 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Determining chosen radio button?

Is there an easy way to determine which radio button in a
group has been chosen, besides having to put code in the
checkchanged or clicked event for each button in the
group...???

thanks,

vince
Nov 15 '05 #1
1 33787
You can just put handle the CheckChanged event of the entire group.

radiobtn.CheckChanged (this would be the method)

And then in that method do something like this to see if it is checked:

void CheckChanged(object sender, EventArgs e)
{
RadioButton radioBtn = (RadioButton) sender;

if (radioBtn.Checked)
{
MessageBox.Show("Radio Button: " + radioBtn.Text + " is checked");
} // if (radioBtn.Checked)
}// void CheckChanged(object sender, EventArgs e)

This should work for you. You may have to check exact sytax since I just
typed this up quick from memory.

Jared Baszler
"vince" <vl******@sdcera.org> wrote in message
news:01****************************@phx.gbl...
Is there an easy way to determine which radio button in a
group has been chosen, besides having to put code in the
checkchanged or clicked event for each button in the
group...???

thanks,

vince

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Renie83 | last post by:
Hi all! I was wondering does anyone have any ideas on how I can send info to a SQL database by choosing a radio button. What I want to do is set one radio button to "Max" and one to type "Avg"....
0
by: ana_gil | last post by:
Hello I need help whit a validation control. I have a radio button list which i made required: <asp:radiobuttonlist id="_AlergiasSN" runat="server"> <asp:listitem id="_AlergiasS"...
4
by: lemat | last post by:
Hi, I use a radio button form in which users can select a color by clicking on a image. I would like this image to change to another one when it's chosen. (image with a "Chosen" Stamp in the...
2
by: newfie912 | last post by:
I have an online application used for grading students. On one of the pages, I have a table with two rows and each row has 16 cells. The upper row contains the letter grade (A, A-, B+, B, etc)...
1
by: Para | last post by:
Hi , I am working on a project using C/C++ in linux environment. Our program right now using the command line(console window) inputs and starts executing. command on console are to start...
1
by: Visual77 | last post by:
I'm trying to set up a script that checks to see how many radio buttons are set to Yes and how many are set to No. I'm using PHP to generate all the radio buttons and name them, and as it goes...
3
by: Thad | last post by:
On one page I have radio buttons below pictures, here is one picture... <img src="images/web-aroundworld458c.jpg" width="100" height="51" border="0"...
3
by: camdev | last post by:
I have a form with 2 radio buttons and multiple checkboxes (see example below). The one radio button indicates all and the other radio button indicates the user has chosen specific options...
0
by: Ellyyra | last post by:
I am trying to make a 'Character Generator' for a website. In the first page they are asked for three pieces of information each with a group of radio buttons; Gender-Male, Female;...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.