Setting Inner Tag Content at Design Time programmatically

Tech-Archive recommends: Fix windows errors by optimizing your registry



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?


.



Relevant Pages

  • AspNetHostingPermission trouble - How do you develop custom controls?
    ... I'm trying to develop a custom web control but I can't add it to an aspx ... page through the VS.NET designer. ... As usual everthing works as it should if I run with administrator ... It seems that registering them in the GAC does solve the ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • cant see the HTML added to Templated Control in design mode
    ... I have a web control that has its own designer implemented....everything ... I get the proper values that are stored in the container but I ... Why do I get a grey box when I open my page containing the control in the ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • dynamic image? store and retrieve properties values? resizable web control?
    ... How to display a dynamic image in the web control, ... control can set properties values based on designer time settings? ... How to make web control resizable during the designer time? ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Telling weither the control is in design time or on a web page
    ... A control designer is what emits the HTML to be shown in VS.NET's design view. ... I have a web control and I want to render it differnetly when it is in ... design mode as aposed to when it is on a web page. ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Working With WPF in D2007/D2008?
    ... Afaik not officially supported but doable, just without proper ... Designer in VS.NET isn't much, ... But the XAML code editor is quite good, allowing you to jump to event handler code and creating event handlers on the fly while you are editing the markup. ...
    (borland.public.delphi.non-technical)