Share via


FileField.DefaultTemplateName Property

Gets the name of the default rendering template on forms when the control mode is New.

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.

Remarks

This override returns "FileFieldNew", which is the value of the ID attribute of a <RenderingTemplate> element in an .ascx file in the folder %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\template\controltemplates. It identifies the RenderingTemplate template 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.

Notes to Inheritors

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

FileField Class

FileField Members

Microsoft.SharePoint.WebControls Namespace