N
Nathaniel Greene
I am creating a web control. At design time I would like the designer to
inspect the control being hosted, to see if there is any inner content and if
there isn't then programmatically set the server control's markup.
for example <My:Control runat="server"></My:Control> would be changed to
<My:Control runat="server">Some markup</My:Control>
if SetEditableDesignerRegionContent is called by the designer the markup is
changed.
If I call it myself, however it's not changed. The same appears to be true
for Tag.SetContent and almost every other imaginable sample I've seen on the
web.
I have to assume that for a very basic procedure that I am simply missing
something. Tag.SetContent seems to do what i need it to do, except it won't
work if I call it.
Any tips?
inspect the control being hosted, to see if there is any inner content and if
there isn't then programmatically set the server control's markup.
for example <My:Control runat="server"></My:Control> would be changed to
<My:Control runat="server">Some markup</My:Control>
if SetEditableDesignerRegionContent is called by the designer the markup is
changed.
If I call it myself, however it's not changed. The same appears to be true
for Tag.SetContent and almost every other imaginable sample I've seen on the
web.
I have to assume that for a very basic procedure that I am simply missing
something. Tag.SetContent seems to do what i need it to do, except it won't
work if I call it.
Any tips?