473,406 Members | 2,956 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,406 software developers and data experts.

Base Page inheritance in ASP.NET 2.0

Hi

How do i create a base page in ASP.NET 2.0? I don't want to use master pages
as I don't need any visual inheritance.

You could do this simply in ASP.NET 1.1 by creating a base page that
inherted form System.Web.UI.Page and then ensuring that all of your pages
inherited from your own base page.

With the advent of partial classes this seems somewhat more difficult.

I've got the following code
public partial class Default_aspx : BasePage

{

}

where BasePage is a custom base page that I have created, but I get the
following error when i try and compile

CS0263: Partial declarations of 'Default_aspx' must not specify differenet
base classes

Thanks

Nov 18 '05 #1
1 2317
(Not checked).

It looks like to me that :
- the aspx page inherits from the base class
- the code uses then the partial keywork to "complement" the whole derived
class

I would look if the class from which a page inherits is not now a directive
in the ASPX page.

Please let us know.

Patrice
--

"Craig Street" <ju**@craigstreet.com> a écrit dans le message de
news:y8******************@news-server.bigpond.net.au...
Hi

How do i create a base page in ASP.NET 2.0? I don't want to use master pages as I don't need any visual inheritance.

You could do this simply in ASP.NET 1.1 by creating a base page that
inherted form System.Web.UI.Page and then ensuring that all of your pages
inherited from your own base page.

With the advent of partial classes this seems somewhat more difficult.

I've got the following code
public partial class Default_aspx : BasePage

{

}

where BasePage is a custom base page that I have created, but I get the
following error when i try and compile

CS0263: Partial declarations of 'Default_aspx' must not specify differenet
base classes

Thanks


Nov 18 '05 #2

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

Similar topics

6
by: Paul | last post by:
In real life situation, do we ever come across a situation where we would need two base objects in an object. A snippet is worth 1000 words (: so... class Base { }; class Derived1:public Base...
1
by: Dave | last post by:
Hello NG, Regarding access-declarations and member using-declarations as used to change the access level of an inherited base member... Two things need to be considered when determining an...
3
by: Peter Cresswell | last post by:
Hi guys/gals, I'm using VS.net 2003 and having trouble with the following: I am trying to inherit a base class into a web form, but VS will then not allow me to add any ASP.NET controls using...
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...
3
by: hurcan solter | last post by:
Consider the code fragment; class A { public: A(){} A(int prm):mprm(prm){} int mprm; }; class B:public A {
47
by: Larry Smith | last post by:
I just read a blurb in MSDN under the C++ "ref" keyword which states that: "Under the CLR object model, only public single inheritance is supported". Does this mean that no .NET class can ever...
3
by: Goran Djuranovic | last post by:
Hi all, Is there a way to retrieve a derived class name inside a subroutine or a function of the base class? I am trying to get some data from the database, based on which derived class is calling...
3
by: Hillbilly | last post by:
I just deployed using FTP to send .aspx and .cs files alike and discovered the base class I use with Master Pages is apparently causing problems --unidentified at the moment-- but a test page that...
0
by: =?Utf-8?B?Zmplcm9uaW1v?= | last post by:
Hi all, As I mentioned in a previous thread (see 'Dbghelp, symbols and templates' in microsoft.public.windbg), we created a powerful symbol engine using dbghelp to dump the contents of the stack...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.