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

Can you have multiple "inherits" on one page?

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 that may require an
inherit also?

Thanks,

Tom

Nov 19 '05 #1
7 1683
You cannot since .NET does not allow multiple inheritance. maybe use an
interface, or some usercontrols on the page to add this functionality.
"tshad" <ts**********@ftsolutions.com> wrote in message
news:uk**************@tk2msftngp13.phx.gbl...
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 that may require an
inherit also?

Thanks,

Tom

Nov 19 '05 #2
Nope, in the CLR (and thus ASP.NET) we only have single inheritance.

-Brock
DevelopMentor
http://staff.develop.com/ballen
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 that may
require an inherit also?

Thanks,

Tom


Nov 19 '05 #3
Not to get into the code-behind/code-inside discussion again, this would be
another reason to not go code-behind. I happen to want to use Andy Smiths
control. If I were using code-behind and inheriting my page, it would be
difficult to use his object (at least it seems that way).

Tom
"Brock Allen" <ba****@develop.com.i_hate_spam_too> wrote in message
news:37*********************@msnews.microsoft.com. ..
Nope, in the CLR (and thus ASP.NET) we only have single inheritance.

-Brock
DevelopMentor
http://staff.develop.com/ballen
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 that may
require an inherit also?

Thanks,

Tom


Nov 19 '05 #4
I don't understand how not using code-behind solve the limitations of
inheritance.

"tshad" <ts**********@ftsolutions.com> wrote in message
news:#F**************@TK2MSFTNGP14.phx.gbl...
Not to get into the code-behind/code-inside discussion again, this would be another reason to not go code-behind. I happen to want to use Andy Smiths
control. If I were using code-behind and inheriting my page, it would be
difficult to use his object (at least it seems that way).

Tom
"Brock Allen" <ba****@develop.com.i_hate_spam_too> wrote in message
news:37*********************@msnews.microsoft.com. ..
Nope, in the CLR (and thus ASP.NET) we only have single inheritance.

-Brock
DevelopMentor
http://staff.develop.com/ballen
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 that may
require an inherit also?

Thanks,

Tom



Nov 19 '05 #5
"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:O3**************@TK2MSFTNGP10.phx.gbl...
I don't understand how not using code-behind solve the limitations of
inheritance.
I'm not. I am just trying to see how this would affect me.

I want to be able to use this control and this is how it is set up by Andy.

I assume there must be some way around this and I am just trying to see what
that is? As I said I am not trying to get into the behind/inside
discussion. It has already been done.

But that doesn't solve my problem if I go to code-behind and then want to
use this control in a bunch of my pages.

In my post in another section it was mentioned I could inherit from the
other class. I am just not sure how I would do that.

Tom
"tshad" <ts**********@ftsolutions.com> wrote in message
news:#F**************@TK2MSFTNGP14.phx.gbl...
Not to get into the code-behind/code-inside discussion again, this would

be
another reason to not go code-behind. I happen to want to use Andy
Smiths
control. If I were using code-behind and inheriting my page, it would be
difficult to use his object (at least it seems that way).

Tom
"Brock Allen" <ba****@develop.com.i_hate_spam_too> wrote in message
news:37*********************@msnews.microsoft.com. ..
> Nope, in the CLR (and thus ASP.NET) we only have single inheritance.
>
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
>
>> 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 that may
>> require an inherit also?
>>
>> Thanks,
>>
>> Tom
>>
>
>
>



Nov 19 '05 #6
simple, have the code behind inherit from
MetaBuilders.WebControls.DialogPage instead of the asp page

-- bruce (sqlwork.com)

"tshad" <ts**********@ftsolutions.com> wrote in message
news:uk**************@tk2msftngp13.phx.gbl...
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 that may require an
inherit also?

Thanks,

Tom

Nov 19 '05 #7
I think this scenario exactly illustrates the problem of using inheritance.
In the CLR you only have one base class, so you must choose wisely. Pigeonholing
people into an inheritance scenario to use common functionality imposes too
much of a constraint in a single inheritance world. You've been forced to
forgo one library for another given these constraints. C'mon guys, OOP is
long dead. ((I know I'm going to get a rise for that one!))

And to preempt any flames (hey, I'm a C++ guy originally), my point is that
OOP is not a panacea for reuse (especially in the CLR). It *does* have a
place (despite my jab from above), but there are many other reuse mechanisms
available too that are sometimes more flexible.

-Brock
DevelopMentor
http://staff.develop.com/ballen
"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:O3**************@TK2MSFTNGP10.phx.gbl...
I don't understand how not using code-behind solve the limitations of
inheritance.

I'm not. I am just trying to see how this would affect me.

I want to be able to use this control and this is how it is set up by
Andy.

I assume there must be some way around this and I am just trying to
see what that is? As I said I am not trying to get into the
behind/inside discussion. It has already been done.

But that doesn't solve my problem if I go to code-behind and then want
to use this control in a bunch of my pages.

In my post in another section it was mentioned I could inherit from
the other class. I am just not sure how I would do that.

Tom
"tshad" <ts**********@ftsolutions.com> wrote in message
news:#F**************@TK2MSFTNGP14.phx.gbl...
Not to get into the code-behind/code-inside discussion again, this
would

be
another reason to not go code-behind. I happen to want to use Andy
Smiths
control. If I were using code-behind and inheriting my page, it
would be
difficult to use his object (at least it seems that way).
Tom
"Brock Allen" <ba****@develop.com.i_hate_spam_too> wrote in message
news:37*********************@msnews.microsoft.com. ..
Nope, in the CLR (and thus ASP.NET) we only have single
inheritance.

-Brock
DevelopMentor
http://staff.develop.com/ballen
> 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 that may
> require an inherit also?
>
> Thanks,
>
> Tom
>


Nov 19 '05 #8

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

Similar topics

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...
0
by: Rob Meade | last post by:
Hi all, ok - the scenario... We have a secure login page known as the Clinical Portal (single login etc) - we have a web user control for this which checks if a session is available or not...
4
by: Don Wash | last post by:
Hi All! I'm getting the following Error: No DLLs has been compiled yet and nothing in the \bin directory. So it is not the versioning problem or anything like that. And here are the...
3
by: Jim in Arizona | last post by:
Most of the asp.net learning I've done has been from books that were written during the 1.0 framework. I didn't have a copy of visual studio when I started reading them then I got a hold of VS 2005...
1
by: Jethro | last post by:
Hi all I have got my .NET vb project compiling nicely into an EXE. I wish to use one of the components (declared as Public) stored in the EXE as a base class for subsequent DLLs to INHERIT...
2
by: Ranginald | last post by:
Hi, I have two pages. Default.aspx ....Codefile="default.aspx.cs" Inherits="Web" %> and Sculpture.aspx
0
by: Rod | last post by:
I have made a copy of my (ASP.NET) project and renamed it everywhere I could find. I am stuck with one bit I can't figure out. The line at the top of the HTML which looks like this %@ Page...
4
by: =?Utf-8?B?QWxleCBNdW5r?= | last post by:
My Web application is developed in C# Visual Studio 2005 Professional. After deploying the application to the production server I am getting the following error: <%@ Application...
4
by: Tom P. | last post by:
What would the difference be between the following two: public class Foo : IList<string> { .... } public class Foo : List<string>
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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,...
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...

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.