Udostępnij za pośrednictwem


SPMobileComponent.DefaultTemplateName Property

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

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

Syntax

'Declaration
Public Overridable ReadOnly Property DefaultTemplateName As String
    Get
'Usage
Dim instance As SPMobileComponent
Dim value As String

value = instance.DefaultTemplateName
public virtual string DefaultTemplateName { get; }

Property Value

Type: System.String
A String that represents the ID of the default template for the component.

Remarks

The default implementation of this property is always a null reference (Nothing in Visual Basic). Hence, you must override DefaultTemplateName if you want your SPMobileComponent-derived component to have a default RenderingTemplate that it uses if the TemplateName property is not set.

When overridden in a derived class, the DefaultTemplateName property holds the value of the ID attribute of a <RenderingTemplate> element in either the file MobileDefaultTemplates.ascx or GbwMobileDefaultTemplates.ascx located in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\CONTROLTEMPLATES or in a custom *.ascx file in that same folder.

See Also

Reference

SPMobileComponent Class

SPMobileComponent Members

Microsoft.SharePoint.MobileControls Namespace