J
J055
Hi
I need to send parameters to a user control contructor. Is this what the
TemplateControl.LoadControl (Type, Object[]) is for? If so can someone show
me how to use it please?
This is my attempt so far but I get a MissingMethodException - Constructor
on type '*' not found. The control would be loaded twice anyway. Hopefully
you can see what I'm trying to achieve.
Control myCtrl = LoadControl("~/Controls/myCtrl.ascx");
PlaceHolder ph = (PlaceHolder)fv.FindControl("ph");
ph.Controls.Add(LoadControl(myCtrl.GetType(), new object[] { myobj }));
ph.Visible = true;
Many thanks
Andrew
I need to send parameters to a user control contructor. Is this what the
TemplateControl.LoadControl (Type, Object[]) is for? If so can someone show
me how to use it please?
This is my attempt so far but I get a MissingMethodException - Constructor
on type '*' not found. The control would be loaded twice anyway. Hopefully
you can see what I'm trying to achieve.
Control myCtrl = LoadControl("~/Controls/myCtrl.ascx");
PlaceHolder ph = (PlaceHolder)fv.FindControl("ph");
ph.Controls.Add(LoadControl(myCtrl.GetType(), new object[] { myobj }));
ph.Visible = true;
Many thanks
Andrew