TemplateBasedControl.CustomAlternateTemplate 属性
获取或设置自定义的备用模板。
命名空间: Microsoft.SharePoint.WebControls
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
<TemplateContainerAttribute(GetType(TemplateContainer))> _
<PersistenceModeAttribute(PersistenceMode.InnerProperty)> _
Public Property CustomAlternateTemplate As ITemplate
Get
Set
用法
Dim instance As TemplateBasedControl
Dim value As ITemplate
value = instance.CustomAlternateTemplate
instance.CustomAlternateTemplate = value
[TemplateContainerAttribute(typeof(TemplateContainer))]
[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
public ITemplate CustomAlternateTemplate { get; set; }
属性值
类型:System.Web.UI.ITemplate
呈现控件ITemplate对象。
备注
The CustomTemplate and CustomAlternateTemplate properties are marked with the [PersistenceMode(PersistenceMode.InnerProperty)] attribute. This means that the ITemplate objects that they return are compiled and persist in the TemplateBasedControl object as a nested tag. There are several advantages to using precompiled templates; for example, they can be added to a page in a visual designer such as Microsoft SharePoint Designer or Visual Studio by dragging and dropping them from the designer toolbox. But there are disadvantages also. For more information, see Patterns of Custom Field Rendering, Web User Controls and Web Custom Controls, and PersistenceModeAttribute.
另请参阅
引用
Microsoft.SharePoint.WebControls 命名空间
Web User Controls and Web Custom Controls