SPMobileListFieldIterator.TemplateName Property

Gets the name of the template to be used in rendering the fields.

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

Syntax

'Declaration
Public Overrides ReadOnly Property TemplateName As String
    Get
'Usage
Dim instance As SPMobileListFieldIterator
Dim value As String

value = instance.TemplateName
public override string TemplateName { get; }

Property Value

Type: System.String
A String that represents the name of the template to be used in rendering the fields.

Remarks

The following table shows how the return value varies according to whether the item is a folder and whether it is a list view page, display form, or some other form.

Page type

Current item is a folder

Current item is not a folder

List view

"MobileFolderIterator"

"MobileItemIterator"

Display form

"MobileDisplayFolderContents"

"MobileDisplayItemContents"

Other form

"MobileFolderContents"

"MobileItemContents"

The TemplateName property holds the value of the ID attribute of a <RenderingTemplate> element in the file MobileDefaultTemplates.ascx or GbwMobileDefaultTemplates.ascx located in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\CONTROLTEMPLATES. You must not modify MobileDefaultTemplates.ascx or GbwMobileDefaultTemplates.ascx, but you can override this template by creating another <RenderingTemplate> element with the same ID in a custom *.ascx file in the ...\CONTROLTEMPLATES folder. See Walkthrough: Customizing a Mobile Home Page for an example of the process of modifying the rendering of mobile controls.

If the current context is neither a list view nor a form, the name of the base template is returned.

See Also

Reference

SPMobileListFieldIterator Class

SPMobileListFieldIterator Members

Microsoft.SharePoint.MobileControls Namespace