Question How to update a textbox on Form from a click on a button on a User Control?

seinkraft

Member
Joined
Sep 28, 2008
Messages
19
Programming Experience
5-10
Hi, I need update the text of a textbox when I do click on a button on a user control.

How I can do that?
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,493
Location
Sydney, Australia
Programming Experience
10+
The UserControl shouldn't have to know anything about its parent container. The most appropriate way to accomplish what you want is for the UserControl to raise an event and either pass the text in the event's data or else just expose the data via a property. The form would then handle that event and, when it's raised, get the data and update its own TextBox.
 
Top Bottom