Home > DeveloperSection > Forums > How to pass value from one Windows Form to another Windows Form in C#
Andrew Watson
Andrew Watson

Total Post:39

Posted on    December-21-2010 4:45 AM

 C# C# 

 2 Reply(s)
 2350  View(s)
Rate this:
Hello Everyone, here I have a problem in passing value from one windows form to another windows form.
If possible provide me any helpful link or code.

Uttam Misra

Total Post:125

Posted on    December-21-2010 4:51 AM

Awadhendra Tiwari

Total Post:126

Posted on    January-21-2011 2:20 AM

make a parametrize constructor in second form and pass values to that constructor as following example shows...

class Form1 : Form
        public void btn_click(object sender,EventArgs e)
                Form2 fr=new Form2("Awadhendra",21,"Allahabad");

class Form2 : Form
        private string name,city;
        private int age;
        public Form2(string name,int age,string city)

Don't want to miss updates? Please click the below button!

Follow MindStick