Web Control that looks like a Component in the designer

Discussion in 'ASP .Net Building Controls' started by justncase80, Oct 11, 2005.

  1. justncase80

    justncase80 Guest

    Hello,
    I have a webcontrol that I have created that cannot be edited in the
    designer and is automatically resized and repositioned by the browser
    at load time and therefore has no need to be positioned in the designer
    or rendered for previewing. So what I want to do is to know how to
    create a desinger class that will allow my webcontrol to be drawn in
    the designer as if it were a composite control but still render to the
    window as a webcontrol. Here is a sample of what I *wish* I could do:

    namespace MyControls
    {
    [
    ToolboxData("<{0}:MyWebControl runat=\"server\">
    </{0}:MyWebControl>"),
    Designer(MyControls.MyComponentDesigner,
    typeof(ComponentDesigner))
    ]
    public MyWebControl : WebControl
    {
    //...
    public override void Render(HtmlWriter output)
    {
    base.Render(output);
    }
    }

    public class MyComponentDesigner : ComponentDesigner
    {
    //...
    }
    }


    This seems like it should work but I can't seem to get it right! The
    component designer seems like it just won't work with a WebControl!
    Does anyone know how to do this?

    Thanks,
    Justin Chase
     
    justncase80, Oct 11, 2005
    #1
    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. Joe
    Replies:
    1
    Views:
    510
  2. =?Utf-8?B?V2lsbGlhbSBTdWxsaXZhbg==?=

    Why is it that 100% width looks like 95%?

    =?Utf-8?B?V2lsbGlhbSBTdWxsaXZhbg==?=, Nov 1, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    311
    Patrick.O.Ige
    Nov 2, 2005
  3. =?iso-8859-1?q?J=FCrgen_Gerstacker?=

    A swing/awt component that looks like a LED

    =?iso-8859-1?q?J=FCrgen_Gerstacker?=, Dec 15, 2006, in forum: Java
    Replies:
    2
    Views:
    1,169
    =?iso-8859-1?q?J=FCrgen_Gerstacker?=
    Dec 17, 2006
  4. Steve B.
    Replies:
    4
    Views:
    999
    Cheryl D Wise
    Jun 1, 2007
  5. AAaron123
    Replies:
    11
    Views:
    1,162
    AAaron123
    Nov 27, 2008
Loading...

Share This Page