S
Steve Wesorick
I have a custom web control that inherits from
System.Web.UI.WebControls.Panel
What I want is for developers to be able to drag controls from the
toolbox, into my control, and have them appear as they would on the
finished page. My control renders a table around the outside of its
child controls, and puts a special header row at the beginning of this
table.
for example:
<cc1:myctl id=myctl1 runat=server text="sometext!"
imageURL="mygif.gif"><span>some content and child
controls</span></cc1:myctl>
comes out at run time as:
<table>
<tr>
<td><img src="mygif.gif">sometext!</td>
</tr>
<tr>
<td><span>some content and child controls</span></td>
</tr>
</table>
If I inherit System.Web.UI.Design.ControlDesigner as my designer, I
can override the GetDesignTimeHTML function, and get everything to
render correctly at design time. However, you cannot click on the
child controls, or drag controls from the toolbox onto my custom
control that way.
If I inherit System.Web.UI.Design.WebControls.PanelDesigner
as my designer, then I can drag and drop controls from the toolbox,
and click on them to edit them, etc. However, I can't figure out how
to get my custom html to wrap around the design-time control. (At run
time everything is fine) I've tried overriding the GetDesignTimeHTML
function, but it doesn't seem to be firing.
System.Web.UI.WebControls.Panel
What I want is for developers to be able to drag controls from the
toolbox, into my control, and have them appear as they would on the
finished page. My control renders a table around the outside of its
child controls, and puts a special header row at the beginning of this
table.
for example:
<cc1:myctl id=myctl1 runat=server text="sometext!"
imageURL="mygif.gif"><span>some content and child
controls</span></cc1:myctl>
comes out at run time as:
<table>
<tr>
<td><img src="mygif.gif">sometext!</td>
</tr>
<tr>
<td><span>some content and child controls</span></td>
</tr>
</table>
If I inherit System.Web.UI.Design.ControlDesigner as my designer, I
can override the GetDesignTimeHTML function, and get everything to
render correctly at design time. However, you cannot click on the
child controls, or drag controls from the toolbox onto my custom
control that way.
If I inherit System.Web.UI.Design.WebControls.PanelDesigner
as my designer, then I can drag and drop controls from the toolbox,
and click on them to edit them, etc. However, I can't figure out how
to get my custom html to wrap around the design-time control. (At run
time everything is fine) I've tried overriding the GetDesignTimeHTML
function, but it doesn't seem to be firing.