I have a Panel control inside of an UpdatePanel. When I set Panel.Enabled = false; on postback, all controls inside the Panel become disabled. However, when I call Panel.Visible = false; on postback, the Panel still displays.
This code does as expected:
protected void rdoPayment_CheckedChanged(object sender, EventArgs e)
{
pnlBillingAddress.Enabled = rdoCreditCard.Checked;
upBillingAddress.Update();
}
If I change the code to this, the panel is still visible when it's set to false:
protected void rdoPayment_CheckedChanged(object sender, EventArgs e)
{
pnlBillingAddress.Visible = rdoCreditCard.Checked;
upBillingAddress.Update();
}
Further, if I change the code like so, when Enabled is set to false, the controls no longer become disabled and the panel is still visible:
protected void rdoPayment_CheckedChanged(object sender, EventArgs e)
{
pnlBillingAddress.Enabled = rdoCreditCard.Checked;
pnlBillingAddress.Visible = rdoCreditCard.Checked;
upBillingAddress.Update();
}
Anyone have any idea what's going on here?
ps. I can post the aspx portion of the code, but it's really long so I'll only post it if it's absolutely needed.