Inheritance with Control and Page

A

Aaron Prohaska

Can anyone tell me how I can make a base class that both
System.Web.UI.Control and System.Web.UI.Page can inherit from. I need to
add common functionality to both of these classes across my app.

Regards,

Aaron Prohaska

-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-
Wrench Science Inc.
http://www.wrenchScience.com/
Phone: 510.841.4748 x206
Fax: 510.841.4708
-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-
 
P

Pete Davis

It sounds like what you want to do is Super-class Control and Page, which
you can't do. You can't give them a common ancestor other than the ones they
already have.

The closest you can get is to create an interface and have both your
control-derived and page-derived classes inherit the interface, but the
implementation will have to be specific to each class.

Pete
 
J

junk

Ir appears that you are mixing concepts here. A Page is a collection of
controls. If you need a collection of controls inherit from a Page.

[This followup was posted to microsoft.public.dotnet.framework and a
copy was sent to the cited author.]
 

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

Top