inheriting from a class that inherits from the UserControl class

  • Thread starter Thread starter Joel Barsotti
  • Start date Start date
J

Joel Barsotti

On certain pages I want to have a user control that is derived not directly
from the usercontrol class, but from a class that extends the UserControl
class so my objects will have a some guaranteed functionality.

But my problem is that when I do this, the ascx file won't go into design
view.

Other than switching the inheritance of my ascx.cs files back and forth I
don't know a way to get around this.

I know there must be an easy way of doing this, but I can't find it in the
help files.
 
Joel,

What error are you receiving when you try to open the ascx file in design
view?

Nicole
 
"The file failed to load in the Web Form designer. Please correct the
following error, then load it again: Type Abstract" is the error message I
get.
 
Joel,

Your base class is probably abstract, which the designer cannot handle.
Remove the abstract keyword from the base class definition, then rebuild
your project. If there aren't any other problems, this should allow you to
open the derived user control ascx file in design view.

HTH,
Nicole
 
Thank you, very much it works.

Nicole Calinoiu said:
Joel,

Your base class is probably abstract, which the designer cannot handle.
Remove the abstract keyword from the base class definition, then rebuild
your project. If there aren't any other problems, this should allow you to
open the derived user control ascx file in design view.

HTH,
Nicole


message
 
Back
Top