J
Justin Dutoit
Hey. I'm trying to dynamically add User Controls to my page. It appears to
work sometimes, but more often I get the error:
Unable to cast object of type 'ASP.SearchControl' to type
'ASP.SearchControl'.
Dim ctlNextSearch As Control = LoadControl("SearchCB.ascx")
CType(ctlNextSearch, SearchControl).SearchString = SearchItems(Counter)
MyPlaceHolder.Controls.Add(ctlNextSearch)
In the User Control the directive is:
<%@ Control ClassName="SearchControl" Language="VB" %>
I would appreciate any help, thanks.
Tks
Justin Dutoit
work sometimes, but more often I get the error:
Unable to cast object of type 'ASP.SearchControl' to type
'ASP.SearchControl'.
Dim ctlNextSearch As Control = LoadControl("SearchCB.ascx")
CType(ctlNextSearch, SearchControl).SearchString = SearchItems(Counter)
MyPlaceHolder.Controls.Add(ctlNextSearch)
In the User Control the directive is:
<%@ Control ClassName="SearchControl" Language="VB" %>
I would appreciate any help, thanks.
Tks
Justin Dutoit