G
Guest
I have a form that has a button in it when I click on the button I want the
textbox that is on the usercontrol to update. Ive tried:
//This is on the form
private void button1_Click(object sender, System.EventArgs e)
{
UserControl1 ctrl = new UserControl1();
ctrl.ClientName = "This is a test";
}
//This is on the usercontrol
public string ClientName
{
get
{
return this.textBox1.Text;
}
set
{
this.textBox1.text = value;
}
}
when I check the value is in the textbox but it doesn't update itself or
fire the event can someone tell me what Im doing wrong.
Thanks
Kim
textbox that is on the usercontrol to update. Ive tried:
//This is on the form
private void button1_Click(object sender, System.EventArgs e)
{
UserControl1 ctrl = new UserControl1();
ctrl.ClientName = "This is a test";
}
//This is on the usercontrol
public string ClientName
{
get
{
return this.textBox1.Text;
}
set
{
this.textBox1.text = value;
}
}
when I check the value is in the textbox but it doesn't update itself or
fire the event can someone tell me what Im doing wrong.
Thanks
Kim