Page Base Classes

  • Thread starter Thread starter Tom J.
  • Start date Start date
T

Tom J.

..NET seems to support inheritance of the Page class, but it doesn't seem to
render the information from the base class properly, at least not by
default.

If I create a base class, say, PageBase that derives from the 'normal' Page
class - then derive a new page type, say LoginPage, that derives from
PageBase I would have expected the controls, background, etc. that I placed
on the PageBase class level to appear in the LoginPage page - but they
don't.

Can anyone tell me what is going on here? ...Is there an easy work-around
(available now), or should I abandon the idea of a visual inheritance in the
current version of .NET?

Thanks!
 
The visual components can't be inherited. The code can.

The .aspx itself, technically inherits from the class defined in the .vb
file. You will notice, that private variables in your .vb file will not be
accessible in server side scripts in the .aspx. But the protected ones will
be - because protected variables can be inherited.
 
How do you think it's going to look like.
When page renders it self it renders evrything from <HTML> to </HTML>
So do you want to see 2 <HTML> tags in your output?

I do not think so.

George.
 
Back
Top