NumberField.DefaultAlternateTemplateName property
Gets the name of the default alternate rendering template for NumberField controls.
Namespace: Microsoft.SharePoint.WebControls
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Protected Overrides ReadOnly Property DefaultAlternateTemplateName As String
Get
'Usage
Dim value As String
value = Me.DefaultAlternateTemplateName
protected override string DefaultAlternateTemplateName { 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\15\template\controltemplates.
Remarks
This override returns "PercentageNumberField", which is the value of the ID attribute of a <RenderingTemplate> element in the DefaultTemplates.ascx file. It identifies the RenderingTemplate that can be used as a fallback if the AlternateTemplateName property is called before it is set or if for any reason the template it names cannot be used. (The AlternateTemplateName and [Microsoft.SharePoint.WebControls.NumberField.DefaultAlternateTemplateName] properties are intended to be used when the number field should be rendered as a percentage.)
If you override DefaultAlternateTemplateName, you must define your custom <RenderingTemplate> element in a custom .ascx file in the folder ...\controltemplates.