473,394 Members | 1,869 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,394 software developers and data experts.

link radio button to textbox

I have 6 radio buttons in a column with a single line text box next to
each rb.

is there a general straightforward way to link a radio button to the
textbox next to it.

I want to be able to click on any of the rb in the column and from
that click derive the contents of the textbox next to it that it is
"linked" to.

I hope thats clear, what im asking.

i know the controls are stored as an array of controls if i put them
in a panel, but there doesnt seem to be anyway to predict or match the
index number of the control to make use of it
thanks for any info
Mar 21 '07 #1
2 3625
Peted,

Why not just create an event handler for the click event of the radio
buttons, and link them all to the same event handler? You can tell which
radio button triggered the event by checking the sender parameter of the
event handler, and then have your logic work based on that.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<Petedwrote in message news:08********************************@4ax.com...
>I have 6 radio buttons in a column with a single line text box next to
each rb.

is there a general straightforward way to link a radio button to the
textbox next to it.

I want to be able to click on any of the rb in the column and from
that click derive the contents of the textbox next to it that it is
"linked" to.

I hope thats clear, what im asking.

i know the controls are stored as an array of controls if i put them
in a panel, but there doesnt seem to be anyway to predict or match the
index number of the control to make use of it
thanks for any info


Mar 21 '07 #2
yeah, i was hoping there was a way of "linking" the two controls
together, so i could derive a connection to the textbox after deriving
the radiobutton that was clicked.

I was thinking perhaps i could assign the textbox to the rb tag object
propertiy perhaps
On Wed, 21 Mar 2007 10:30:04 -0400, "Nicholas Paldino [.NET/C# MVP]"
<mv*@spam.guard.caspershouse.comwrote:
>Peted,

Why not just create an event handler for the click event of the radio
buttons, and link them all to the same event handler? You can tell which
radio button triggered the event by checking the sender parameter of the
event handler, and then have your logic work based on that.

Hope this helps.
Mar 22 '07 #3

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

Similar topics

1
by: Michael Albanese | last post by:
I am developing an application to handle my compay's OSHA reporting requirements. Some of the input criteria are technical and narowly defined, so I was trying to prvide what i call "Context...
2
by: Bart Verbeke | last post by:
Hi, I have a form with 2 radio buttons (ACCEPT/REJECT). When the page is initially loaded, no textbox should be visible. When a user clicks the REJECT radio button, a textbox should...
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"...
1
by: jw01 | last post by:
Im trying to write a java script in HTML in which when a particular radio button is selected, a textbox would appear write next to the selected item. e.g (RADIO BUTTON) fhd: (RADIO BUTTON) fdj:...
2
by: jw01 | last post by:
I changed my code...Now everytime i click a radio button, a text box appears...What i want is when i hit a particular radio button, the textbox should only appear next to that radio button. And if...
5
by: Kulgan | last post by:
Hi all, Is it possible in javascript to add a textbox when the last of three radiobuttons is clicked ? thanks !
0
by: Gary W. Smith | last post by:
Hello, I have a simple form with a radio button group on it and I need to do some basic validation based upon which button is checked. Here is a little more detail. if button one is...
3
by: Fred Blair | last post by:
I am trying to use Radio Buttons to record a student's choice on a multiple choice test. I am using the MouseClick event to then put the choice into a textbox. This is just to learn about radio...
2
by: shreeks | last post by:
I am newbie working on Access. I am asked to create a new database screen with "Letter Variables" as the field name. Letter variables is a radio button with Yes and No fields. If an Yes radio...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...

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.