Hi all,
For example if you have two forms the first one (name it Form1) include one textbox control and button , and when pressing button you want to pass the textbox text to the second form (name it Form2).
Thanks
Passing data from one form to another form.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Madhu KRank #1,514 · 1.1K reputationPosted Nov 21, 2010, 6:42 PM EST
http://codeincsharp.blogspot.com/2008/04/how-to-pass-values-to-another-form.html
Deepak SharmaRank #540 · 4.5K reputationPosted Nov 21, 2010, 6:42 PM EST
You can pass textbox value as a parameter of the second form.
Form2 frm2=new Form2(TextBox1.Text);
But for this you have to define a parameter in Form2 constructor.