-1

I have two forms..form1 and form2 form1 contains two texboxes and one submit button form2 contains one label When i click on submit button in form1..the values of two textboxes in form1 should be sent to label in form2..

here is my code in form1

namespace password_char
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if(textBox1.Text=="abc"&&textBox2.Text=="123")
            {
                this.Hide();
                Form2 x = new Form2();
                x.Show();
            }
        }
    }
}

how can i pass this data to label in form2?????

Moumit
  • 8,314
  • 9
  • 55
  • 59
Sahi
  • 1
  • 1
  • 2
    Well, the list of duplicates for this question is infinite. Just check the RELATED column here on the right of the page. Next time do a bit of research before posting – Steve Mar 03 '16 at 16:01

1 Answers1

0

Possibly this question is duplication with many answer. Just standard c# syntax like assign value with object.

x.lablel.text=value from from1

jalil
  • 85
  • 10