B
Ben de Vette
Hi,
I like to load a UserControl onto a placeholder with some more control then
just doing
protected System.Web.UI.WebControls.PlaceHolder placeHolder;
UserControl ascx = (UserControl)Page.LoadControl("myUserControl.ascx");
placeHolder.Controls.Add(ascx);
More something like
UserControl uc = new myUserContol();
uc.Name = "just A Test";
uc.Initialize();
placeHolder.Contols.Add(uc);
The problem lies in the fact that any contols placed in myUserControl are
not instanciated in the second example. Any idea how I get this working?
Thanks,
Ben
I like to load a UserControl onto a placeholder with some more control then
just doing
protected System.Web.UI.WebControls.PlaceHolder placeHolder;
UserControl ascx = (UserControl)Page.LoadControl("myUserControl.ascx");
placeHolder.Controls.Add(ascx);
More something like
UserControl uc = new myUserContol();
uc.Name = "just A Test";
uc.Initialize();
placeHolder.Contols.Add(uc);
The problem lies in the fact that any contols placed in myUserControl are
not instanciated in the second example. Any idea how I get this working?
Thanks,
Ben