Web Custom Control Designer

Discussion in 'ASP .Net Web Controls' started by VR, May 16, 2004.

  1. VR

    VR Guest

    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
     
    VR, May 16, 2004
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:e$...
    > 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
    >
    >
    >
     
    Robert Koritnik, May 19, 2004
    #2
    1. Advertising

  3. VR

    VR Guest

    ok, thanks a lot, you gave the answers I was looking for

    regards,
    Victor Reboucas


    "Robert Koritnik" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:e$...
    > > 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
    > >
    > >
    > >

    >
    >
     
    VR, May 21, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dales
    Replies:
    18
    Views:
    960
    Jim Cheshire [MSFT]
    Dec 3, 2003
  2. PJ6
    Replies:
    9
    Views:
    2,787
  3. Steve B.
    Replies:
    4
    Views:
    988
    Cheryl D Wise
    Jun 1, 2007
  4. Don
    Replies:
    1
    Views:
    169
    Andrew Backer
    Jul 19, 2005
  5. Don
    Replies:
    1
    Views:
    193
    Andrew Backer
    Jul 19, 2005
Loading...

Share This Page