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
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