By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,215 Members | 1,920 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,215 IT Pros & Developers. It's quick & easy.

Visual inheritance

P: n/a
Hi,

I'm still using VB.NET 2002.
I was wondering if I could do the following :

I'm creating a web-application.
Now I want to create a base-webform that contains the layout for all my
pages.
Would it then be possible to inherite my new webforms from that
base-webform?
How would I do this?

Thanks in advance.
Nov 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
It is possible to do it but both VS.NET 2002 and 2003 have lots of
problems with these. Your controls that are in the markup are not
inherited. Only the code is inherited.

Nov 19 '05 #2

P: n/a
So if I was to draw a table on my page it would not be inherited?
"re****@community.nospam" <ma**********@gmail.com> schreef in bericht
news:11**********************@o13g2000cwo.googlegr oups.com...
It is possible to do it but both VS.NET 2002 and 2003 have lots of
problems with these. Your controls that are in the markup are not
inherited. Only the code is inherited.

Nov 19 '05 #3

P: n/a
You can do inheritance and have the base class' controls work with the derived
classes' controls. There is no support in VS.NET though for visual inheritance
as there is in Windows Forms.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,

I'm still using VB.NET 2002.
I was wondering if I could do the following :
I'm creating a web-application.
Now I want to create a base-webform that contains the layout for all
my
pages.
Would it then be possible to inherite my new webforms from that
base-webform?
How would I do this?
Thanks in advance.


Nov 19 '05 #4

P: n/a
No. You inherits only the code. You have AFAIK several options here :
- you should find on the Internet some controls for doing this
- depending on the appearence you could create the common appearance by code
(and as you inherits code it works though you'll looose design time support
for this part)
- some are doing something similar by loading user controls on a "template"
page

ASP.NET 2.0 will add somthing similar to solution #1 out of the box (this is
called "master pages").

Patrice
--

"Bart Schelkens" <bs********@hotmail.com> a écrit dans le message de
news:OH**************@TK2MSFTNGP09.phx.gbl...
So if I was to draw a table on my page it would not be inherited?
"re****@community.nospam" <ma**********@gmail.com> schreef in bericht
news:11**********************@o13g2000cwo.googlegr oups.com...
It is possible to do it but both VS.NET 2002 and 2003 have lots of
problems with these. Your controls that are in the markup are not
inherited. Only the code is inherited.


Nov 19 '05 #5

P: n/a
In Visual Studio 2005 creating visual inheritance will be much easier.
There will
also be Master Pages that will allow all your pages to inherit a common
structure.
http://www.c-sharpcorner.com/Code/20...asterPages.asp

Until then you might want to consider simply create a header user control
and a footer user control and dragging them onto each page and the top and
bottom respectively.
http://SteveOrr.net/faq/usercustom.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Bart Schelkens" <bs********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,

I'm still using VB.NET 2002.
I was wondering if I could do the following :

I'm creating a web-application.
Now I want to create a base-webform that contains the layout for all my
pages.
Would it then be possible to inherite my new webforms from that
base-webform?
How would I do this?

Thanks in advance.

Nov 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.