VS.NET designer support for nested custom web form controls

Discussion in 'ASP .Net Building Controls' started by Casper, Jun 8, 2004.

  1. Casper

    Casper Guest

    I have a custom web form control, that can contain other custom
    controls.
    Is it possible to add designer support for this, so I can drag a
    custom control onto another control?
    Casper, Jun 8, 2004
    #1
    1. Advertising

  2. "Casper" <> wrote in message
    news:...
    > I have a custom web form control, that can contain other custom
    > controls.
    > Is it possible to add designer support for this, so I can drag a
    > custom control onto another control?


    Yes and no.

    Your outer control could derive from Panel, for instance, in which case you
    could drag other controls onto it in the same way as a Panel control works.

    But it would be _exactly_ like a Panel control. If I remember correctly,
    there is a trade-off between this "drag" behavior and the ability to have
    your outer control do its own design-time rendering. I believe that the
    designer will ignore your outer control designer's GetDesignTimeHtml method
    and simply render the inner controls.

    Alternatively, your outer control could support templates. You couldn't
    directly drag controls onto it then, but you could enter template editing
    mode and then drag controls into the template editing area.
    --
    John Saunders
    johnwsaundersiii at hotmail
    John Saunders, Jun 8, 2004
    #2
    1. Advertising

  3. Casper

    Casper Guest

    "John Saunders" <> wrote in message news:<#>...
    > "Casper" <> wrote in message
    > news:...
    > > I have a custom web form control, that can contain other custom
    > > controls.
    > > Is it possible to add designer support for this, so I can drag a
    > > custom control onto another control?

    >
    > Yes and no.
    >
    > Your outer control could derive from Panel, for instance, in which case you
    > could drag other controls onto it in the same way as a Panel control works.
    >
    > But it would be _exactly_ like a Panel control. If I remember correctly,
    > there is a trade-off between this "drag" behavior and the ability to have
    > your outer control do its own design-time rendering. I believe that the
    > designer will ignore your outer control designer's GetDesignTimeHtml method
    > and simply render the inner controls.
    >

    That solution would be good enought for me, I'll work a little bit
    more with that idea.

    > Alternatively, your outer control could support templates. You couldn't
    > directly drag controls onto it then, but you could enter template editing
    > mode and then drag controls into the template editing area.

    That could also be a good solution. Do you have some examples or
    guides, something to get me started with templates.

    Thanks for you reply :)
    Casper, Jun 9, 2004
    #3
  4. "Casper" <> wrote in message
    news:...
    > "John Saunders" <> wrote in message

    news:<#>...
    > > "Casper" <> wrote in message
    > > news:...
    > > > I have a custom web form control, that can contain other custom
    > > > controls.
    > > > Is it possible to add designer support for this, so I can drag a
    > > > custom control onto another control?

    ....
    > > Alternatively, your outer control could support templates. You couldn't
    > > directly drag controls onto it then, but you could enter template

    editing
    > > mode and then drag controls into the template editing area.

    > That could also be a good solution. Do you have some examples or
    > guides, something to get me started with templates.


    Actually, no, I don't have an example handy. If I were you, I'd start with
    the MSDN documentation.
    --
    John Saunders
    johnwsaundersiii at hotmail
    John Saunders, Jun 9, 2004
    #4
    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. SimonH
    Replies:
    2
    Views:
    315
    William F. Robertson, Jr.
    Feb 1, 2005
  2. Edward Diener

    Web Form designer and HTML controls

    Edward Diener, Jul 20, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    325
    Edward Diener
    Jul 20, 2006
  3. Steve B.
    Replies:
    4
    Views:
    962
    Cheryl D Wise
    Jun 1, 2007
  4. Paul Ingles

    Designer Support for Selecting Web Form control

    Paul Ingles, Jul 19, 2003, in forum: ASP .Net Building Controls
    Replies:
    4
    Views:
    140
    John Saunders
    Jul 19, 2003
  5. SimonH

    Giving Web User Controls designer support

    SimonH, Feb 1, 2005, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    115
    William F. Robertson, Jr.
    Feb 1, 2005
Loading...

Share This Page