Click here to Skip to main content
15,890,897 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
1st Form

C#
namespace TestApp
{
    public partial class Form1 : Form
    {
        string testrun = "one";
        //public string testrun { get; set; }

        public string Name {
        get { return Name; }
            set { Name = testrun; }
        }
    }

}


here i'm Passing the testrun values to Name variable

2nd Form

C#
private void button1_Click(object sender, EventArgs e)
        {
            Form1 f3 = new Form1();
            //f3.SomePropertyName = "hello from form2";
            textBox1.Text = f3.Name;
        }


Here i'm passing the name variable to the textbox.......

basically i want to get testrun value to the second form and display it in the 2nd form textbox.
Posted
Comments
Pradeep Shukla 7-Oct-13 23:21pm    
you have not mentioned what is the issue you are facing...

 
Share this answer
 
hello professional



try it ton this way..

how would i show my user name to another page top of the form using c# windows application?[^]

it will help you


Happy to Help!!!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900