DelegateControl.Template_Controls 属性

获取或设置模板,它定义填充委托控件的行为。

命名空间:  Microsoft.SharePoint.WebControls
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
<PersistenceModeAttribute(PersistenceMode.InnerProperty)> _
<TemplateContainerAttribute(GetType(UserControl))> _
<TemplateInstanceAttribute(TemplateInstance.Single)> _
Public Property Template_Controls As ITemplate
    Get
    Set
用法
Dim instance As DelegateControl
Dim value As ITemplate

value = instance.Template_Controls

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

属性值

类型:System.Web.UI.ITemplate
表示用于填充委托控件模板的**[System.Web.UI.ITemplate]**对象。

示例

下面的示例使用Template_Controls属性包含用于的 ASPX 页的顶部导航区域的数据源控件。

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

另请参阅

引用

DelegateControl 类

DelegateControl 成员

Microsoft.SharePoint.WebControls 命名空间