473,287 Members | 1,564 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,287 software developers and data experts.

Web Page code behind inherits from another class

In ASP.NET 1.x a codebehind file X could inherit from class Y assuming that
Y inherited from System.Web.UI.Page. In ASP.NET 2.0 this appears to be
problematic since the previous codebehind is now a partial class and is more
closely tied to the .aspx page. Is it possible to mimic this behavior in
ASP.NET 2.0?

The pros/cons of this approach could be argued but we have a number of
existing applications using this technique that we need to migrate.

Thanks in advance.

Mark
May 17 '06 #1
2 1652
> In ASP.NET 1.x a codebehind file X could inherit from class Y assuming
that Y inherited from System.Web.UI.Page. In ASP.NET 2.0 this appears
to be problematic since the previous codebehind is now a partial class
and is more closely tied to the .aspx page.
They were just as tightly coupled in 1.x.
Is it possible to mimic this behavior in ASP.NET 2.0?
The inheritance model in 2.0 is no different than it was in 1.x. What's different
is who compiles the codebehind. In 1.x VS.NET compiled the codebehind whereas
in 2.0 ASP.NET compiles the codebehind.
The pros/cons of this approach could be argued but we have a number of
existing applications using this technique that we need to migrate.


For migration purposes there's a VS.NET 2005 addin called "Web Application
Projects" designed to help in migration of older VS.NET 2003 projects to
compile and run under ASP.NET 2.0. It's up on MSDN somewhere -- I'd suggest
googling for it.

-Brock
http://staff.develop.com/ballen
May 18 '06 #2
Hi Mark,

Thank you for posting!

I agree with Brock on this. You can find Web Application Projects here:
http://webproject.scottgu.com/

Regards,

Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

May 18 '06 #3

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

Similar topics

4
by: Mircea Pleteriu | last post by:
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...
1
by: Michael Evanchik | last post by:
Tying not to spaghetti code which seems to be easy to do in .net, im trying to do my main .net html in index.aspx, use repeated .net html in an .ascx files and all code im doing in .vb code behind...
3
by: Jeff Cooper | last post by:
Hey Folks, I have a bunch of aspx pages in a solution. One of these pages, call it header1.aspx, has it's code behind in header1.aspx.vb. Another, header2.aspx, has header2.aspx.vb. When I...
5
by: Nazir | last post by:
I am trying to do something pretty simple - but can't see how it can be done in ASP.NET. I have an aspx web page with a form which opens up a new window. The web page uses code behind to build...
6
by: martin | last post by:
Hi, I am a web page and a web user control. My web user control is placed in my web page using the following directive <%@ Register TagPrefix="uc1" TagName="Header"...
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: N. Demos | last post by:
I have a user control with code behind of which two instances are created/declared in my aspx page. The aspx page has code behind also, as I need to access methods of the usercontrols on page...
3
by: ABC | last post by:
How to create a web page class for inhert web page using ASP.NET 1.1 and 2.0?
5
by: Ashlewis | last post by:
Hi all, I have two aspx pages: Default.aspx with its code behind page of Default.aspx.vb Home.aspx with its code behind page of Home.aspx.vb The Default page in effect is just a template, the...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
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...

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.