A
Andrew Jocelyn
Hi
Maybe it's because it's Friday afternoon but I can't work out how to simply
use the same Label control in two different PlaceHolder controls. This is
what happens. When I add the Label to the second PlaceHolder it's removed
from the first. I want any changes to the Label to be reflected in both
PlaceHolders.
Label lb = new Label();
lb.Text = "Label";
PlaceHolder1.Controls.Add(lb);
Response.Write(PlaceHolder1.HasControls().ToString()); // true
PlaceHolder2.Controls.Add(lb);
Response.Write(PlaceHolder1.HasControls().ToString()); // false
In real live the Label with be a custom control with child controls. What
should I do?
Thanks
Andrew
Maybe it's because it's Friday afternoon but I can't work out how to simply
use the same Label control in two different PlaceHolder controls. This is
what happens. When I add the Label to the second PlaceHolder it's removed
from the first. I want any changes to the Label to be reflected in both
PlaceHolders.
Label lb = new Label();
lb.Text = "Label";
PlaceHolder1.Controls.Add(lb);
Response.Write(PlaceHolder1.HasControls().ToString()); // true
PlaceHolder2.Controls.Add(lb);
Response.Write(PlaceHolder1.HasControls().ToString()); // false
In real live the Label with be a custom control with child controls. What
should I do?
Thanks
Andrew