G
Guest
I'm a lot confused when using user controls in ASP.NET 2.0. How do I cast a
varaible to the type of a user control... for example:
Me.PlaceHolder1.Controls.Add(Page.LoadControl("~/App_Controls/ctlApplicationHome.ascx"))
' now, this doesn't work... why?
Dim apl As App_Controls_ctlApplicationHome = Me.PlaceHolder1.Controls(0);
varaible to the type of a user control... for example:
Me.PlaceHolder1.Controls.Add(Page.LoadControl("~/App_Controls/ctlApplicationHome.ascx"))
' now, this doesn't work... why?
Dim apl As App_Controls_ctlApplicationHome = Me.PlaceHolder1.Controls(0);