S
shark
I have a placeholder in a control that is in turn, used as a control in
a placeholder in a form.
I am getting a viewstate error so I believe I have to clear my
placeholder before I load the control within the control.
How to I address this placeholder to clear it? The following gives me a
null object error:
PlaceHolder myPlaceHolder =
(PlaceHolder)this.FindControl("Form1").FindControl("PlaceHolder5");
myPlaceHolder.Controls.Clear();
myPlaceHolder.Controls.Add(myControl);
(Form1 is the aspx page that holds a placeholder. That placeholder has
its own dynamic controls).
Thanks in advance.
a placeholder in a form.
I am getting a viewstate error so I believe I have to clear my
placeholder before I load the control within the control.
How to I address this placeholder to clear it? The following gives me a
null object error:
PlaceHolder myPlaceHolder =
(PlaceHolder)this.FindControl("Form1").FindControl("PlaceHolder5");
myPlaceHolder.Controls.Clear();
myPlaceHolder.Controls.Add(myControl);
(Form1 is the aspx page that holds a placeholder. That placeholder has
its own dynamic controls).
Thanks in advance.