I put a button inside UserControl and put this UserControl in the form. I want the textbox text in the form to be updated when the button is clicked.
public partial class UserControl1 : UserControl
{
public UserControl1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Form1 form1 = new Form1();
form1.textBox1.Text = "1";
//The textbox text is not updated!
}
}
The textbox text is not updated