473,394 Members | 1,935 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,394 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 1655
> 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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.