Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: Inheritance between classes


Message #1 by "Geoffrey Schneider" <jefferrs@w...> on Sat, 20 Jul 2002 12:09:06
Hi all,

What I'm about to ask may be a really stupid question, so please be 
nice :)

I know it's possible to make my class inherit from the Page class, 
because that's the normal thing to do. But how do I make the class in 
myClass.cs inherit from the class in the myOtherClass.cs file, which is 
inherited from the Page class?

I know this can be done by including both my classes in the same .cs 
file, but how do I seperate the two classes into seperate files? (and 
they can't be .aspx file - they must be code-behind .cs or .vb files!)

I suspect this has got something to do with namespaces? If someone could 
point me in the right direction, I'd be very grateful. :)

Jefferrs
Message #2 by "Lauser, John" <LauserJ@h...> on Mon, 22 Jul 2002 13:34:33 -0400
Take a look at these. They should clear it up for you.

Inheritance
http://www.4guysfromrolla.com/webtech/022001-1.shtml
http://www.c-sharpcorner.com/Language/InheritNPolyRVS.asp

Namespaces
http://www.c-sharpcorner.com/Language/WorkingWithNamespacesGAG.asp

Also try just doing google searches. To grab these links I just did a
google search on:
.net inheritance
C# inheritance

The links above were just a couple of the results. I am sure you can
find more if you need to.

John



-----Original Message-----
From: Geoffrey Schneider [mailto:jefferrs@w...]
Sent: Saturday, July 20, 2002 08:09
To: aspx_beginners
Subject: [aspx_beginners] Inheritance between classes


Hi all,

What I'm about to ask may be a really stupid question, so please be
nice :)

I know it's possible to make my class inherit from the Page class,
because that's the normal thing to do. But how do I make the class in
myClass.cs inherit from the class in the myOtherClass.cs file, which is
inherited from the Page class?

I know this can be done by including both my classes in the same .cs
file, but how do I seperate the two classes into seperate files? (and
they can't be .aspx file - they must be code-behind .cs or .vb files!)

I suspect this has got something to do with namespaces? If someone could

point me in the right direction, I'd be very grateful. :)

Jefferrs

  Return to Index