hi..i want that the matter in my label1 on the first page shud be copied to other page on the label present there....
and also i want that the value in drop down box that person choses on first page is copied to label on second page.........
pls help....

Recommended Answers

All 4 Replies

matter

That is incorrect usage, usually I don't care about syntax but the the fact that you Thread title resembles string theory, and then you use the word matter.

Anyway, the data can be accessed by the child by using the following

Form1 form1 = new Form1();
form1.label1.Text;

Make sure Label1 has Public Modifier.

Enjoy.
Mark as solved if solved.

commented: insert witty positive rating comment here +1

hey thnx bt wat to write on second label to retieve this value...

label2 = form1.label1.Text;

Making a controls access modifier to public is not a good way of programming.Instead of that use properties which is more flexible way of setter and getter method

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.