views:

39

answers:

1

okay so this is probably a soft pitch question for sombody, but I want to be able decratively drop some content into a control like so:

<uc1:floatingControl id="myFloatingControl" runat="server">
  <floatingContent>
     Hello world<br />
     <asp:button id="arbitraryASPControl" runat="server" />
     <uc2:arbiratryUserControl id="foo" runat="server" />
   </floatingContent>
</uc1:floatingControl>

So what does it take to get that kind of functionality.

Also there is no real requirement for the floatingContent tag inside from my persepective, but I realize it may be a nessecary convention.

If anybody knows a good article about it, that would be immensily helpful.

+3  A: 

Never had to do this, but I believe it's all about ParseChildren.

http://msdn.microsoft.com/en-us/library/system.web.ui.parsechildrenattribute.aspx

You can have inner tags treated as properties of the class, and then manipulate them as you would normally.

Adam A