Hi, reading a book on .NET I see the following code.
// MyControl.ascx contains a user control
MyControl c2 = (MyControl)Load Control("MyCont rol.ascx");
form1.Controls. Add(c2);
I do not think this cast is necesarry is it? I am almost certain. Could this
not simply be:
Control c2 = LoadControl("My Control.ascx");
form1.Controls. Add(c2);
// MyControl.ascx contains a user control
MyControl c2 = (MyControl)Load Control("MyCont rol.ascx");
form1.Controls. Add(c2);
I do not think this cast is necesarry is it? I am almost certain. Could this
not simply be:
Control c2 = LoadControl("My Control.ascx");
form1.Controls. Add(c2);
Comment