make chechbox=>Properties=>autopostback=true,
in check event
if(chechbox.checked)
{
textbox2.Text=textbox1.Text;
}
else
textbox2.Text="";
if(chechbox.checked)
{
foreach (Control c in form1.Controls)
{
if (c.GetType().Name.ToLower() == "webusercontrol_ascx")
{
UserControl uc = (UserControl)c;
TextBox txt = (TextBox)uc.FindControl("txtShiptoName");
TextBox txt2 = (TextBox)uc.FindControl("txtShiptoName2");
txt2.Text = txt.Text;
}
}
}
else
txt2.Text="";