I'm trying to put the ship to info into the bill to info text boxes. When the check box is checked the bill to info text boxes need to be populated with the same values from ship to info text boxes. The code that I have works when I click the send button the values are displayed on a separate page and if the check box is checked the ship to and bill to are the same. But on the form when I click the check box the blank bill to fields are not populated with the same data, the text boxes stay empty even with the declared values.
protected void CbxShipto_CheckedChanged(object sender, EventArgs e)
{
CheckBox CbxShipto1 = (CheckBox)this.FindControl("CbxShipto");
if (CbxShipto1.Checked)
{
txtFirstName2.Text = TxtFirstName.Text;
txtLastName2.Text = TxtLastName.Text;
ddlState2.Text = ddlState.Text;
txtStreet2.Text = TxtStreet.Text;
txtCity2.Text = txtCity.Text;
txtzip2.Text = txtZip.Text;
}
}