Page inheritance

  • Thread starter Thread starter Mircea Pleteriu
  • Start date Start date
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?
 
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
 
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
 
Back
Top