TemplateBasedControl Class
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

TemplateBasedControl Class

Windows SharePoint Services 3

Represents a control that is defined by a template rather than by the schema of the list.


Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class TemplateBasedControl : SPControl, 

Use this class (or one of its derived classes) as a base for deriving specific types of template-rendered controls. You can use an existing template that is included with Windows SharePoint Services 3.0 or create your own.

Templates are objects of type ITemplate. Typically they serve as the value of the RenderingTemplate.Template property. RenderingTemplate objects are defined in .ascx files located in the following folder:

C:\program files\common files\microsoft shared\web server extensions\12\template\controltemplates

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2015 Microsoft