473,322 Members | 1,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Page inheritance

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?

Nov 17 '05 #1
4 1685
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

"Mircea Pleteriu" <mp*******@asp-gmbh.de> wrote in message
news:OX**************@TK2MSFTNGP12.phx.gbl...
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?

Nov 17 '05 #2
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

"Mircea Pleteriu" <mp*******@asp-gmbh.de> wrote in message
news:OX**************@TK2MSFTNGP12.phx.gbl...
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?

Nov 17 '05 #3
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
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #4
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
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: BK | last post by:
I am writing a tiered inheritance structure in ASP.NET and would like opinions on the best way to accomplish the correct inheritance dynamically. The page structure is going to look similar to the...
5
by: Invalidlastname | last post by:
Hi, I just read the pattern "Design and Implementation Guidelines for Web Clients" from MSDN. Here is my question. In chapter 3,...
7
by: tshad | last post by:
I have a control that I am using from Metabuilders that requires you to use: <%@ Page Inherits="MetaBuilders.WebControls.DialogPage" %> How do I inherit my code-behind page or another object...
2
by: BK | last post by:
I am writing a tiered inheritance structure in ASP.NET and would like opinions on the best way to accomplish the correct inheritance dynamically. The page structure is going to look similar to the...
3
by: Pini | last post by:
Hi all,In asp.net 1.x i creates a basepage that extends System.Web.UI.Page class. I created this file in a web appplcaition project and then refernced it from another projects. All the pages in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.