Share via


DelegateControl.Template_Controls Property

Gets or sets the template that defines the behavior for populating the delegate control.

Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<TemplateContainerAttribute(GetType(UserControl))> _
<TemplateInstanceAttribute(TemplateInstance.Single)> _
<PersistenceModeAttribute(PersistenceMode.InnerProperty)> _
Public Property Template_Controls As ITemplate
    Get
    Set
'Usage
Dim instance As DelegateControl
Dim value As ITemplate

value = instance.Template_Controls

instance.Template_Controls = value
[TemplateContainerAttribute(typeof(UserControl))]
[TemplateInstanceAttribute(TemplateInstance.Single)]
[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
public ITemplate Template_Controls { get; set; }

Property Value

Type: System.Web.UI.ITemplate
A [System.Web.UI.ITemplate] object that represents the template for populating the delegate control.

Examples

The following example uses the Template_Controls property to contain the data source control that is used for the top navigational area of an ASPX page.

<SharePoint:DelegateControl 
    runat="server" 
    ControlId="MyTopNavigationDataSource">
    <Template_Controls>
        <asp:SiteMapDataSource
            ShowStartingNode="False"
            SiteMapProvider="MyTopNavigationProvider"
            id="TopSiteMap"
            runat="server"/>
    </Template_Controls>
</SharePoint:DelegateControl>

See Also

Reference

DelegateControl Class

DelegateControl Members

Microsoft.SharePoint.WebControls Namespace