Partilhar via


BooleanField.DefaultTemplateName Property

Gets the name of the default rendering template for BooleanField controls.

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

Syntax

'Declaration
Protected Overrides ReadOnly Property DefaultTemplateName As String
    Get
'Usage
Dim value As String

value = Me.DefaultTemplateName
protected override string DefaultTemplateName { get; }

Property Value

Type: System.String
A String that names a rendering template in an .ascx file in the folder %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\template\controltemplates.

Remarks

This override returns "BooleanField", which is the value of the ID attribute of a <RenderingTemplate> element in the DefaultTemplates.ascx file. It identifies the RenderingTemplate object that can be used as a fallback if the TemplateName property has never been set or if for any reason the template it names cannot be used.

If you override DefaultTemplateName, you must define your custom <RenderingTemplate> element in a custom .ascx file in the folder ...\controltemplates.

For readability and consistency with other classes derived from TemplateBasedControl, avoid using DefaultTemplateName to identify a template that you want to use in special contexts, such as on particular forms. Instead, use AlternateTemplateName.

See Also

Reference

BooleanField Class

BooleanField Members

Microsoft.SharePoint.WebControls Namespace