Page inheritance

M

Mircea Pleteriu

I have created an aspx page called Page1. The class associated with the page
in code behind is abstract.
Now I want to create another aspx page call Page2 that inherits the Page1.

It seems like the Page2 inherits the code behind defined by Page1 but it
does not inherits the html content (the controls) of the Page1.
So, I do not have the controls on my new page.

Can somebody tell me where I am wrong?
 
K

Karl Seguin

The HTML isn't part of the class. Why don't you simply create a user
control and Page.LoadControl it (or Register it), if I understand what you
are trying to do, this is how you should do it.
Karl
 
N

Natty Gur

Hi,

If you don’t care about the visualization of HTML controls in design
mode you can add them dynamically in your base class (onload) and they
will be create in derived classes (webforms)

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
 

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

No members online now.

Forum statistics

Threads
474,085
Messages
2,570,597
Members
47,218
Latest member
GracieDebo

Latest Threads

Top