473,597 Members | 2,157 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Upgrade to asp.net 2, controls declared in base pages

I have upgraded an application from asp.net 1.1 to asp.net 2 (VS 2005). The
problem with this is I had a number of declared controls in base pages. In
the base pages I use the events of the controls and also override functions
that interact with these controls. It sounds a little complicated but works
very well.

My problem is I can't seem to do this in asp.net 2 because it uses partial
classes for the control declaration and won't let you do this.

I have two possible thoughts on how to overcome this.

1. Is there a way to switch the old code behind model back on? i.e. no
partial classes.
2. Using master pages. However with this solution I need to override some
of the functions defined in my master page. I don't think this will work
tho' as the content page does not inherit from the master page (if I've got
this correct here). So unless there is another way round this I'm a bit
stuck on this one.

If anyone can help I'd be more than grateful as I'm quite stuck with this
solution at the moment and a way round it has become an urgent matter (ie p45
in post etc).

thanks

Jun 8 '06 #1
0 1032

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

Similar topics

6
2071
by: Joseph Geretz | last post by:
I recently upgraded my server to Windows 2003. The first thing I noticed is that my sample WebService pages no longer worked. The Invoke test button is missing. This is addresed by the following KB article: Microsoft Knowledge Base Article - 819267 INFO: HTTP GET and HTTP POST Are Disabled by Default http://support.microsoft.com/default.aspx?scid=kb;en-us;819267 The article advises that a new block be inserted into Web.config (or into
0
864
by: Rans | last post by:
Hello, I made a base class for all the pages in my project, so that instead of "public class CSomePage : System.Web.UI.Page" i got "public class CSomePage : CPage Since some parameters are common to all pages, i did put some server hidden fields controls in the base class. Ex: (in the base class)
0
1324
by: L Scott | last post by:
I've created a page ancestry (framework) for our application so that all pages in our app would have the same look and feel. To do this, I created several user controls (header, footer, menu, etc.) and then a C# class which inherits from System.Web.UI.Page. In the OnInit() method of this class, I dynamically load these user controls using the 'this.Controls.AddAt()' method (as well as call the base.OnInit() method to load the objects from...
9
4086
by: Alan Silver | last post by:
Hello, I have a user control which I am trying to load dynamically, but am running into problems. I think the problem is because I have two .ascx files that refer to the same .ascx.cs file. A simple example is like this... Ferret1.ascx =========
1
1445
by: Eric Theil | last post by:
Hello, I'm just getting into ASP.Net 2.0 and I can't figure out an effective way (or at least one that I think is effective) to perform one of the techniques I used to use in 1.0/1. As an example, I have multiple user controls whose code behind functionality is identical, but display is completely different, so I would create a base usercontrol (inheriting from UserControl), and declare a protected repeater. I would then make sure a...
1
1482
by: matt | last post by:
Hi, I have two very similar pages, whose codebehind I'd like to derive from the same base class so I can reuse the controller logic. For (hopeful) clarity I'll try and draw this in ASCII-UML! PageBase ^ ^
11
1378
by: netasp | last post by:
hi guys, I am having the following problem: I am trying to access some textbox & dropdown controls from my function located in the app_code folder but I can't see them, it complains about not being declared! or not found. it was working in VS 2003 before the migration; since there is no App_Code but now since I moved it, I can't seem to figure out how to make it see the controls sitting on the aspx form from a shared class sitting in...
0
1130
by: jgdean14 | last post by:
Hi - We have an Early .NET 2.0 App that was created without Master Pages about a year ago. We opted for more of a MVC framework and dynamically- loaded User Controls. We use Custom User-Controls extensively and are currently researching on refactoring the project (WAP) to use Master Pages. One challenge is the fact that since MasterPages are integrated with content pages in the Init() stage, all of our references to User
3
1785
by: =?Utf-8?B?RnJhbmsgVXJheQ==?= | last post by:
Hi all It is maybe a stupid question, but I have some trouble with Inheritance. For example: I create a new class with one form. On this form I place on the bottom a Panel and on this Panel on the right side a button. On both controls I set Anchor (bottom, right).
0
8271
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8380
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8031
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8258
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6686
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
3881
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3923
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2399
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1231
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.