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

VulpesRank #55 · 29.2K reputationPosted May 27, 2011, 12:37 AM EDT
What you were doing wrong before, is to create a new instance of the parent form rather than referencing the existing instance.
Posted May 26, 2011, 9:16 PM EDT
While create the instance for the child form, the assign the value into the public variable or property.
Hope this helps you.
Posted May 26, 2011, 9:18 PM EDT
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.