How to Transfer Data from one Form to the other Form
Hey, is there anyone that can help me? Im pretty new to C# and I need help with something.
My problem looks like this: I have 2 Forms. In form 1 there is a Textbox and in the Second box is a label. when i press a Button in Form 1, Form 1 dissapears and the second Form appears.
I want to type in text in the first form 1 Textbox and i want it to appear in the Second Form Label. How does that work?
3 Replies
Can u show screenshot of both form
I recommend using the constructor of
Form2
to send in the data from Form1
. Either that or a public initialization method.
Something like this:
You could follow this if you haven't figured it out yet
https://www.youtube.com/watch?v=hHHX6DxXSZk
Chamo Niwanthi
YouTube
How to pass data between one form to other form in visual studio wi...
#howtopassvaluesbetweenforms
#Howtopassdatabetweenoneformtootherform
#visualstudiowindowsformapplication