Viewing custom web control at design time

Discussion in 'ASP .Net Building Controls' started by D Wicker, Oct 29, 2003.

  1. D Wicker

    D Wicker Guest

    Hello,
    I've created a custom web control (composite) and added to my toolbox. I
    dragged the control onto a new web form and I see the small green box icon
    for the control but can't figure out how to see the entire control at design
    time. I have a Text property for the control and have set that property with
    some text in the HTML for the web form. I read that by setting one of the
    properties to some value
    will cause the control to appear at design time. But that's not the case so
    far. I still see the small green box icon. The control has buttons,
    tables, and an image- so I'd like to see this all at design time. I see
    everything just fine at run-time.

    Any suggestions on how to get the control to appear at design time on my web
    form?
    Thanks!

    Donnie
    D Wicker, Oct 29, 2003
    #1
    1. Advertising

  2. Hi

    Probably your control is rendered at runtime with some methods that are not
    performed at designe time.

    You can try to put in debug your control at design time
    (http://www.microsoft.com/mspress/books/sampchap/5728e.asp -
    http://www.fawcette.com/vsm/2003_01/online/hottips/lasker /) and it checks
    if the methods are executed with which create the content of your composit
    custom control at runtime.

    If you want you can divide the code executed at runtime from that executed
    at design time producing a new class that inherits from
    System.Web.UI.Designer.ControlDesigner, to associate this class to your
    control has to use the attribute:
    [Designer(typeof(YourAssembly.YourClassInheritFromControlDesigner))]

    Some links:
    http://www.oreilly.de/catalog/aspdotnetnut/chapter/ch06.html
    http://www.codeproject.com/aspnet/composite_controls.asp

    Hi


    "D Wicker" <> ha scritto nel messaggio
    news:#...
    > Hello,
    > I've created a custom web control (composite) and added to my toolbox. I
    > dragged the control onto a new web form and I see the small green box icon
    > for the control but can't figure out how to see the entire control at

    design
    > time. I have a Text property for the control and have set that property

    with
    > some text in the HTML for the web form. I read that by setting one of the
    > properties to some value
    > will cause the control to appear at design time. But that's not the case

    so
    > far. I still see the small green box icon. The control has buttons,
    > tables, and an image- so I'd like to see this all at design time. I see
    > everything just fine at run-time.
    >
    > Any suggestions on how to get the control to appear at design time on my

    web
    > form?
    > Thanks!
    >
    > Donnie
    >
    >
    Giorgio Parmeggiani, Nov 2, 2003
    #2
    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. Replies:
    0
    Views:
    705
  2. Allan Ebdrup
    Replies:
    11
    Views:
    637
    Walter Wang [MSFT]
    Jul 26, 2007
  3. Replies:
    1
    Views:
    356
    Teemu Keiski
    Jul 2, 2003
  4. jdp

    Viewing Usercontrol Property Changes at Design Time

    jdp, Jul 13, 2006, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    109
  5. jdp

    Viewing Usercontrol Property Changes at Design Time

    jdp, Aug 3, 2006, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    128
Loading...

Share This Page