Hi
I have a mdi parent form and that contains a variable with tha name of Eboname now i want to get that variable value in child form and did code as bellow but do not get value...
public Elegent_Shop frmain;
frmain = new Elegent_Shop();
textBox1.Text = this.frmain.eboname.ToString();
any body help please...
Loading
VulpesPosted May 27, 2011, 4:37 AM
What you were doing wrong before, is to create a new instance of the parent form rather than referencing the existing instance.
Posted May 27, 2011, 1:18 AM
http://www.c-sharpcorner.com/Forums/Thread/123648/passing-value-from-one-form-to-other.aspx
http://www.c-sharpcorner.com/Forums/Thread/123702/how-to-manipulate-another-form-from-the-other-without-re.aspx
Hope this helps you.
Posted May 27, 2011, 1:16 AM
While create the instance for the child form, the assign the value into the public variable or property.
Hope this helps you.