Attaching Content to Custom Controls
okay, so this is probably a soft step question for someone, but I want to avoid the quotation mark in the contingent, for example:
<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 this functionality.
Also there is no real requirement for the floatingContent tag inside from my perfective, but I understand that this could be a conditional convention.
If anyone knows a good article on this it will be very helpful.
+1
a source to share
1 answer
Never had to do this, but I believe it all in ParseChildren.
http://msdn.microsoft.com/en-us/library/system.web.ui.parsechildrenattribute.aspx
You can have internal tags that are treated as properties of the class and then manipulate them as usual.
+3
a source to share