P
Paul Bromley
I see that this question has been asked before in thye newsgroups, but I
cannot find a suitable answer. I have created a user control that has quite
a number of buttons and textboxes. These I have specifically given very
similar names - e.g. button - cmdSodium, cmdPotassium, txtSodium,
txtPotassium. The user will press a command button with the caption Sodium
on it, and I want that click of the button to access the text in the
relevant textbox - i.e. txtSodium.Text. I obtain the name of the button
being used with sender.text.ToString, and I obviously get Sodium. How can I
convert this string to access the text in the relevant textbox - i.e.
txtSodium.Text. I was hoping that I could do this very easily and place very
generic code in each of the Click events.
Many thanks in anticipation.
Paul Bromley
cannot find a suitable answer. I have created a user control that has quite
a number of buttons and textboxes. These I have specifically given very
similar names - e.g. button - cmdSodium, cmdPotassium, txtSodium,
txtPotassium. The user will press a command button with the caption Sodium
on it, and I want that click of the button to access the text in the
relevant textbox - i.e. txtSodium.Text. I obtain the name of the button
being used with sender.text.ToString, and I obviously get Sodium. How can I
convert this string to access the text in the relevant textbox - i.e.
txtSodium.Text. I was hoping that I could do this very easily and place very
generic code in each of the Click events.
Many thanks in anticipation.
Paul Bromley