Inside of my control I've create three ITemplate properties wich should be used as containers for Head, Content and Footer.
Here is example of my Content property
Expand|Select|Wrap|Line Numbers
- 1 <Browsable(False), Description("The template property"), PersistenceMode(PersistenceMode.InnerProperty), TemplateContainer(GetType(ContentPanel))> _
- 2 Public Property Content() As ITemplate
- 3 Get
- 4 Return _content
- 5 End Get
- 6 Set(ByVal value As ITemplate)
- 7 _content = value
- 8 End Set
- 9 End Property
ContentPanel is another control wich inherits from Panel control.
Now I've got fallowing asp.net code:
Expand|Select|Wrap|Line Numbers
- 1 <controls:MyControl id="MyControl1" runat="server">
- 2 <Content>
- 3 <asp:Label ID="someLabel" runat="server" Text="dupa" />
- 4 </Content>
- 5 </controls:LayoutFrameControl>