I'm creating a user control and I want to have a templated section on it called ContentTemplate similar to how the UpdatePanel has a ContentTemplate tag. When you use the UpdatePanel and you place controls inside of the ContentTemplate section you can access all of the controls in the ContentTemplate without having to do a FindControl() action for each control.
How would I implement this same functionality in my own usercontrol?
I have the following code written for the template property in my user control but the controls inside of the ContentTemplate aren't accessibly by the page my control is declared on.
Private _contentTemplate As System.Web.UI.ITemplate
<PersistenceModeAttribute(PersistenceMode.InnerProperty)> _
<TemplateInstanceAttribute(TemplateInstance.Single)> _
<BrowsableAttribute(False)> _
Public Property ContentTemplate() As System.Web.UI.ITemplate
Get
Return _contentTemplate
End Get
Set(ByVal value As ITemplate)
_contentTemplate = value
End Set
End Property