inheriting from a class that inherits from the UserControl class

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.
 
N

Nicole Calinoiu

Joel,

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

Nicole
 
J

Joel Barsotti

"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.
 
N

Nicole Calinoiu

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
 
J

Joel Barsotti

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
 

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

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top