A
ame
Instead of loading a User Control by filename
-----
Control myCtrl= LoadControl( "~/WebUserControl1.ascx");
this.PlaceHolder1.Controls.Add(myCtrl);
----
- which works-
how can the User Control be loaded by class name ?
I tried
----
Control myCtrl = LoadControl(typeof(WebUserControl1), new Object[]{});
this.PlaceHolder1.Controls.Add(myCtrl);
----
but this does not work. There is no runtime error, but the control is not
shown.
Is there some action missing ?
-----
Control myCtrl= LoadControl( "~/WebUserControl1.ascx");
this.PlaceHolder1.Controls.Add(myCtrl);
----
- which works-
how can the User Control be loaded by class name ?
I tried
----
Control myCtrl = LoadControl(typeof(WebUserControl1), new Object[]{});
this.PlaceHolder1.Controls.Add(myCtrl);
----
but this does not work. There is no runtime error, but the control is not
shown.
Is there some action missing ?