473,406 Members | 2,705 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,406 software developers and data experts.

Radio Buttons question

I have 4 radio buttons. I think I used to able to do in VB6 - assign a value
to each button. So I could do something like

Select Case <GroupRAdioButtons.Value>
Case 1
Run Sub1
Case 2
Run Sub2

How would I do this in Vb.net?
Thanks
Vayse
Feb 21 '07 #1
3 2232
I think this is how Access did it.

I think you need to check each button now
If radiobutton1.Value Then
ElseIf radiobutton2.Value Then
elseif ...
...

Robin S.
-----------------------------
"Vayse" <vvvwrote in message
news:OK**************@TK2MSFTNGP06.phx.gbl...
>I have 4 radio buttons. I think I used to able to do in VB6 - assign a
value to each button. So I could do something like

Select Case <GroupRAdioButtons.Value>
Case 1
Run Sub1
Case 2
Run Sub2

How would I do this in Vb.net?
Thanks
Vayse


Feb 22 '07 #2
Maybe it was Access. Either way - it still makes more sense than a long list
of If statements!
Thanks though.
"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:4t******************************@comcast.com. ..
>I think this is how Access did it.

I think you need to check each button now
If radiobutton1.Value Then
ElseIf radiobutton2.Value Then
elseif ...
...

Robin S.
-----------------------------
"Vayse" <vvvwrote in message
news:OK**************@TK2MSFTNGP06.phx.gbl...
>>I have 4 radio buttons. I think I used to able to do in VB6 - assign a
value to each button. So I could do something like

Select Case <GroupRAdioButtons.Value>
Case 1
Run Sub1
Case 2
Run Sub2

How would I do this in Vb.net?
Thanks
Vayse



Feb 22 '07 #3
You could attach a click event handler to all of them, and then check the
sender's name to see which button it was with a select case statement.

Robin S.
---------------------------------
"Vayse" <vvvwrote in message
news:e0**************@TK2MSFTNGP05.phx.gbl...
Maybe it was Access. Either way - it still makes more sense than a long
list of If statements!
Thanks though.
"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:4t******************************@comcast.com. ..
>>I think this is how Access did it.

I think you need to check each button now
If radiobutton1.Value Then
ElseIf radiobutton2.Value Then
elseif ...
...

Robin S.
-----------------------------
"Vayse" <vvvwrote in message
news:OK**************@TK2MSFTNGP06.phx.gbl...
>>>I have 4 radio buttons. I think I used to able to do in VB6 - assign a
value to each button. So I could do something like

Select Case <GroupRAdioButtons.Value>
Case 1
Run Sub1
Case 2
Run Sub2

How would I do this in Vb.net?
Thanks
Vayse




Feb 22 '07 #4

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

Similar topics

4
by: Oscar Monteiro | last post by:
I Have to sets of Radio buttons like so: <input type="radio" name=p1 value=1> <input type="radio" name=p1 value=2> <input type="radio" name=p1 value=3> <br> <input type="radio" name=p2 value=1>...
3
by: Ken Varn | last post by:
This is probably a simple question, but I am new to this so bear with me. I have a ASP.NET form that has a checkbox and a 2 radio buttons. When the checkbox is checked, the 2 radio buttons are...
1
by: Jerry | last post by:
We have a 10-question quiz for kids, each question being a yes or no answer using radio selections. I'd like to keep a current total of yes's and no's at the bottom of the quiz (if the user selects...
12
html on wheels
by: html on wheels | last post by:
Greeting sports fans. In order to ask multiple questions and not have your radio buttons jump from one question to the next, what do you type to create a break between them. I am trying to complete a...
2
by: dpazza | last post by:
Hi, I'm creating a quiz on using a form in VB 2005 express. I have four sets of questions and answers (labels and radio buttons) and I change between which set of questions is currently shown on...
4
by: Blasting Cap | last post by:
I have a page that has a number of radio buttons that will be displayed to different access levels of a user who logs in to my website. For instance, if there are a dozen buttons, user1 will see...
5
by: alanb | last post by:
Hi, hope someone can help, I need to be able to keep a running total of radio buttons selected, as a user goes through a set of 16 questions, devided in to 4 catorgories, then on "submit" have the...
7
by: help4me | last post by:
Hope someone can help me out with this. I'm having trouble getting my radio button values into a MySQL database. And after I do get them inserted I'm going to want to be able to show them back in...
4
by: CURTISLESPERANCE | last post by:
Hi, I am trying to figure out if this is possible. I need to display 4 radio buttons next to a question then 3 radio buttons after. The 2 different group radio buttons and questions are coming from...
11
by: Twayne | last post by:
Hi, Newbie to PHP here, no C or other relevant background, so pretty niave w/r to the nuances etc. but I think this is pretty basic. XP Pro, SP2+, PHP 4.4.7, XAMPP Local Apache Server...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.