My form has many textboxes. When one of the textboxes is changed, I want to send the textbox’s name and its new value to a method. How do I go about this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Link the text box’s “Text Changed” event to a function and then send that text box’s members to the method:
Just do this for each text box in the form.
EDIT: HERE IS THE GENERIC CODE
Here is the generic code for the text box:
Using this method just link the ‘TextChanged’ event of each text box to this one function. You can do it easily in the event editor in the Properties window in Visual Studio.