Partilhar via


ListFieldIterator.DefaultTemplateName Property

Gets the value of the ID attribute of the <RenderingTemplate> element that defines the rendering of the control.

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 represents the ID of the default template for the control.

Remarks

In Windows SharePoint Services 3.0 this property always returns "ListFieldIterator", which is the value of the ID attribute of a <RenderingTemplate> element in the file FormTemplates.ascx in folder %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\template\controltemplates.

You must not modify DefaultTemplates.ascx. To customize the rendering of this control, create another <RenderingTemplate> element in a new .ascx file in the ...\CONTROLTEMPLATES folder. Give your new <RenderingTemplate> element an ID value that is descriptive but likely to be unique. For example, you could add your company name to the end of the ID, such as "ListFieldIteratorMyCompanyInc". Then derive a new class from ListFieldIterator and override its DefaultTemplateName property so that it returns your custom ID.

See Also

Reference

ListFieldIterator Class

ListFieldIterator Members

Microsoft.SharePoint.WebControls Namespace