Visual inheritance

  • Thread starter Thread starter Bart Schelkens
  • Start date Start date
B

Bart Schelkens

Hi,

I'm still using VB.NET 2002.
I was wondering if I could do the following :

I'm creating a web-application.
Now I want to create a base-webform that contains the layout for all my
pages.
Would it then be possible to inherite my new webforms from that
base-webform?
How would I do this?

Thanks in advance.
 
It is possible to do it but both VS.NET 2002 and 2003 have lots of
problems with these. Your controls that are in the markup are not
inherited. Only the code is inherited.
 
You can do inheritance and have the base class' controls work with the derived
classes' controls. There is no support in VS.NET though for visual inheritance
as there is in Windows Forms.

-Brock
DevelopMentor
http://staff.develop.com/ballen
 
No. You inherits only the code. You have AFAIK several options here :
- you should find on the Internet some controls for doing this
- depending on the appearence you could create the common appearance by code
(and as you inherits code it works though you'll looose design time support
for this part)
- some are doing something similar by loading user controls on a "template"
page

ASP.NET 2.0 will add somthing similar to solution #1 out of the box (this is
called "master pages").

Patrice
--
 
Back
Top