Web Control that looks like a Component in the designer

J

justncase80

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top