dynaically loading a web control from an base class

S

Steve

Hello. I'm using asp.net 2.0. I have a user control with my own base class
The structure looks like this:

MyNewControl
MyUserControlBaseClass
System.Web.UI.UserControl

When I compile the line of code below in MyNewControl, everything works
great. However, when I compile it in MyUserControlBaseClass, then I get the
errror "type MlsFromToFields not defined".

Dim ctrlFromTo As MlsFromToFields =
CType(Page.LoadControl("~/Search/Controls/MlsFromToFields.ascx"),
MlsFromToFields)

How can I move this to my MyUserControlBaseClass??

Thank you very much for your response!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,141
Messages
2,570,818
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top