Page Base Classes

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!
 
M

Marina

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

George Ter-Saakov

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.
 

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

Forum statistics

Threads
474,079
Messages
2,570,575
Members
47,207
Latest member
HelenaCani

Latest Threads

Top