473,493 Members | 4,319 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

inheriting from a class that inherits from the UserControl class

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.
Nov 17 '05 #1
4 1400
Joel,

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

Nicole
"Joel Barsotti" <jo**********@hotmail.com> wrote in message
news:e8**************@tk2msftngp13.phx.gbl...
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.

Nov 17 '05 #2
"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.

"Nicole Calinoiu" <ni*****@somewhere.net> wrote in message
news:e$**************@TK2MSFTNGP11.phx.gbl...
Joel,

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

Nicole
"Joel Barsotti" <jo**********@hotmail.com> wrote in message
news:e8**************@tk2msftngp13.phx.gbl...
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.


Nov 17 '05 #3
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
"Joel Barsotti" <jo**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
"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.

"Nicole Calinoiu" <ni*****@somewhere.net> wrote in message
news:e$**************@TK2MSFTNGP11.phx.gbl...
Joel,

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

Nicole
"Joel Barsotti" <jo**********@hotmail.com> wrote in message
news:e8**************@tk2msftngp13.phx.gbl...
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.



Nov 17 '05 #4
Thank you, very much it works.

"Nicole Calinoiu" <ni*****@somewhere.net> wrote in message
news:eb*************@tk2msftngp13.phx.gbl...
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
"Joel Barsotti" <jo**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
"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.

"Nicole Calinoiu" <ni*****@somewhere.net> wrote in message
news:e$**************@TK2MSFTNGP11.phx.gbl...
Joel,

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

Nicole
"Joel Barsotti" <jo**********@hotmail.com> wrote in message
news:e8**************@tk2msftngp13.phx.gbl...
> 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.
>
>



Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7825
by: Christopher | last post by:
I am trying to load a UserControl which inherits from one of our customer classes which in turn inherits from UserControl. We use Page.LoadControl() from within our ASP.NET pages to load these...
4
1369
by: Alan Silver | last post by:
Hello, I am displaying product details on a page and am allowing the site owner to specify the style in which the product details are displayed. I am debating which of two approaches to use here...
2
1469
by: Charles Law | last post by:
I have a base class - ComponentBase - that inherits from UserControl. My class implements IComponentBase, which defines a minimal set of core properties and methods. All my other components inherit...
4
1167
by: elziko | last post by:
I would like to do the following: Create a class that inherits from a usercontrol. Then add a control to the designer Call this new class ClassA. Many controls I need will start off like this...
3
1511
by: YYZ | last post by:
I swear I've done my research, and now I was just hoping someone could explain this to me. I've got a base class (usercontrol) that I am using just as an interface. Meaning, I've defined...
4
6720
by: DanG | last post by:
Howdy, On past .NET projects, I only had System.Web.UI.Page forms. One application needed a set of functions to do processing against the Page, Session and Request objects associated with the...
2
1283
by: Charlie Brown | last post by:
I have two classes, one that inherits from UserControl called Base. I have a second class that inherits from Base. I do not want to expose a lot of the properties of usercontrol beyond the Base...
2
2863
by: Andrew Backer | last post by:
I hope someone out there can help me with this, because I am stuck. My problem is that I have an instance of a generic class, but I don't know ahead of time what the type parameter used was. In...
0
828
by: Sid (Michele Di Cosmo) | last post by:
I'm trying to have something like this in WPF: Control_A: a control that inherits from GenericControl GenericControl: an abstract control that inherits from UserControl. I can not set Control_A...
0
6980
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7192
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5452
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4886
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4579
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1397
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
282
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.