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

How do i: Visual Inheritance

P: n/a
Hi,

I have one form that i want to make similar to another form but add some
additional controls. I thought the following code would make my webform4
have all the content of webform3 but nothing shows up in webform4.....how do
i make this work?

Thanks.
Public Class WebForm4

Inherits WebForm3
Nov 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
In asp.net 2.0 you have Master pages. There are some 3rd party
implementaions for 1.1. Google for something like "Master Pages for ASP.NET
1.1"

Eliyahu

"John Blair" <jo********@hotmail.com> wrote in message
news:_i****************@newsfe1-win.ntli.net...
Hi,

I have one form that i want to make similar to another form but add some
additional controls. I thought the following code would make my webform4
have all the content of webform3 but nothing shows up in webform4.....how do i make this work?

Thanks.
Public Class WebForm4

Inherits WebForm3

Nov 19 '05 #2

P: n/a
Thanks again....i thought from the vb.net documentation i could do it in
1.1!
"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:uh****************@tk2msftngp13.phx.gbl...
In asp.net 2.0 you have Master pages. There are some 3rd party
implementaions for 1.1. Google for something like "Master Pages for
ASP.NET
1.1"

Eliyahu

"John Blair" <jo********@hotmail.com> wrote in message
news:_i****************@newsfe1-win.ntli.net...
Hi,

I have one form that i want to make similar to another form but add some
additional controls. I thought the following code would make my webform4
have all the content of webform3 but nothing shows up in webform4.....how

do
i make this work?

Thanks.
Public Class WebForm4

Inherits WebForm3


Nov 19 '05 #3

P: n/a
This is not possible, because, although all of your controls are instance
variables in the WebForm3 class, there is no rendering code in WebForm3.
If you embed the rendering code inside of WebForm3 (probably inside of
InitialiseComponent), by adding the controls to Page, the controls and their
rendering will also be inherited.

--
Philip Q
Microsoft MVP [ASP.NET]

"John Blair" <jo********@hotmail.com> wrote in message
news:_i****************@newsfe1-win.ntli.net...
Hi,

I have one form that i want to make similar to another form but add some
additional controls. I thought the following code would make my webform4
have all the content of webform3 but nothing shows up in webform4.....how
do i make this work?

Thanks.
Public Class WebForm4

Inherits WebForm3

Nov 19 '05 #4

P: n/a
Thanks a lot for the feedback....i dont understand the rendering process - i
thought webform3 contained its own redering by default as the controls
display for webform3 when it is say the default start page....but i take
your word this is not possible! Thanks.

"Philip Q [MVP]" <wi******@NOSPAMmvps.org> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
This is not possible, because, although all of your controls are instance
variables in the WebForm3 class, there is no rendering code in WebForm3.
If you embed the rendering code inside of WebForm3 (probably inside of
InitialiseComponent), by adding the controls to Page, the controls and
their rendering will also be inherited.

--
Philip Q
Microsoft MVP [ASP.NET]

"John Blair" <jo********@hotmail.com> wrote in message
news:_i****************@newsfe1-win.ntli.net...
Hi,

I have one form that i want to make similar to another form but add some
additional controls. I thought the following code would make my webform4
have all the content of webform3 but nothing shows up in webform4.....how
do i make this work?

Thanks.
Public Class WebForm4

Inherits WebForm3


Nov 19 '05 #5

P: n/a
Hi,

Thought about what you wrote and tried my example with windows forms - it
works for that!
I now see that with web forms my webform3 is the code behind class only and
not the "HTML" part which i presume does the
rendering so hence no display of controls when i just inherit the code
behind class!
Was nice to see this work with windows forms though! Thanks again!

"John Blair" <jo********@hotmail.com> wrote in message
news:Jw*****************@newsfe1-win.ntli.net...
Thanks a lot for the feedback....i dont understand the rendering process -
i thought webform3 contained its own redering by default as the controls
display for webform3 when it is say the default start page....but i take
your word this is not possible! Thanks.

"Philip Q [MVP]" <wi******@NOSPAMmvps.org> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
This is not possible, because, although all of your controls are instance
variables in the WebForm3 class, there is no rendering code in WebForm3.
If you embed the rendering code inside of WebForm3 (probably inside of
InitialiseComponent), by adding the controls to Page, the controls and
their rendering will also be inherited.

--
Philip Q
Microsoft MVP [ASP.NET]

"John Blair" <jo********@hotmail.com> wrote in message
news:_i****************@newsfe1-win.ntli.net...
Hi,

I have one form that i want to make similar to another form but add some
additional controls. I thought the following code would make my webform4
have all the content of webform3 but nothing shows up in
webform4.....how do i make this work?

Thanks.
Public Class WebForm4

Inherits WebForm3



Nov 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.