![]() |
Web Custom Control Designer
Hi, I'm developing a Web Custom Control and following the MSDN walkthroughs
I got a little confused about one thing using the designer class: In the sample it shows how to render some label text using <h1> to make it bigger but when I run the sample the <h1> is left in the designer, it do not get to my web page (ok, that should be the behavior) My question is: do I need to put inside the designer class just the output I want to use in Design mode and all I want to use both in design and run-time modes in the Render method? Or is there a way to propagate the designer behavior to the web page? (like accessing the designer properties and output in the render method?) thanks in advance, Victor |
Re: Web Custom Control Designer
My answer is:
Normally when creating your own custom control designer you make somehow different rendering methods. Probably you don't have the correct look and feel of the control in design time so there is actually no need to create a "fully blown" runtime rendering at designtime. Normally you just display the control and make any template editors and so on and if it's databound custom control you bind to some dummy data or just a few records from the design time binded datasource. Anyway. Why make the same rendering at design time? the control itself could maybe get the information of it's designer class (never done that, but if the VSE can, why the control couldn't), but it's probably better to make rendering in the control itself and get it via designer.component property. Robert. "VR" <vcreb@hotmail.com> wrote in message news:e$jEGStOEHA.1348@TK2MSFTNGP12.phx.gbl... > Hi, I'm developing a Web Custom Control and following the MSDN walkthroughs > I got a little confused about one thing using the designer class: > > In the sample it shows how to render some label text using <h1> to make it > bigger but when I run the sample the <h1> is left in the designer, it do not > get to my web page (ok, that should be the behavior) > > My question is: do I need to put inside the designer class just the output I > want to use in Design mode and all I want to use both in design and run-time > modes in the Render method? Or is there a way to propagate the designer > behavior to the web page? (like accessing the designer properties and output > in the render method?) > > > thanks in advance, > Victor > > > |
Re: Web Custom Control Designer
ok, thanks a lot, you gave the answers I was looking for
regards, Victor Reboucas "Robert Koritnik" <robert.koritnik.removethis@avtenta.si> wrote in message news:u3JVShcPEHA.3804@TK2MSFTNGP12.phx.gbl... > My answer is: > Normally when creating your own custom control designer you make somehow > different rendering methods. Probably you don't have the correct look and > feel of the control in design time so there is actually no need to create a > "fully blown" runtime rendering at designtime. > Normally you just display the control and make any template editors and so > on and if it's databound custom control you bind to some dummy data or just > a few records from the design time binded datasource. > > Anyway. Why make the same rendering at design time? > > the control itself could maybe get the information of it's designer class > (never done that, but if the VSE can, why the control couldn't), but it's > probably better to make rendering in the control itself and get it via > designer.component property. > > Robert. > > "VR" <vcreb@hotmail.com> wrote in message > news:e$jEGStOEHA.1348@TK2MSFTNGP12.phx.gbl... > > Hi, I'm developing a Web Custom Control and following the MSDN > walkthroughs > > I got a little confused about one thing using the designer class: > > > > In the sample it shows how to render some label text using <h1> to make it > > bigger but when I run the sample the <h1> is left in the designer, it do > not > > get to my web page (ok, that should be the behavior) > > > > My question is: do I need to put inside the designer class just the output > I > > want to use in Design mode and all I want to use both in design and > run-time > > modes in the Render method? Or is there a way to propagate the designer > > behavior to the web page? (like accessing the designer properties and > output > > in the render method?) > > > > > > thanks in advance, > > Victor > > > > > > > > |
| All times are GMT. The time now is 11:00 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.