Compartilhar via


Propriedade SPMobileComponent.TemplateName

Gets or sets the ID attribute of a <RenderingTemplate> element that controls the rendering of the SPMobileComponent object.

Espaço para nome Microsoft.SharePoint.MobileControls
Conjunto de Módulos (Assembly) Microsoft.SharePoint (em microsoft.sharepoint.dll)

A sintaxe

  Public Overridable Property TemplateName As String
Dim instance As SPMobileComponent
Dim value As String

value = instance.TemplateName

instance.TemplateName = value
  public virtual string TemplateName { get; set; }

A propriedade Value

Um String que representa a identificação de um objeto RenderingTemplate T:Microsoft.SharePoint.WebControls.RenderingTemplate.O usar como padrão é o mesmo valor como DefaultTemplateName (que é NULL se não substituído).Hence, if your SPMobileComponent-derived component must have a RenderingTemplate, you must either override DefaultTemplateName, or TemplateName, or ensure that your code always sets TemplateName.

Comentários

In the default implementation, the TemplateName property holds the value of the ID attribute of a <RenderingTemplate> element in either the file MobileDefaultTemplates.ascx located in C:\\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES or in a custom .ascx file in that same folder.

Also, in the default implementation, if Template is not explicitly set, but TemplateName is not null, Template returns the RenderingTemplate template named by TemplateName.

Setting TemplateName (with its default implementation) has the side effect of setting Template to return the RenderingTemplate template that is named by TemplateName.

Por outro lado, configuração Template diretamente NãoDefina como o nome do modelo que foi atribuído a TemplateNameRenderingTemplateTemplate.Assim, você pode reduzir o perigo de Valores inconsistentes, usando quando você precisa definir TemplateNameRenderingTemplate.

If the values of Template and TemplateName are inconsistent, Template determines the RenderingTemplate template that is used to render the component.

Consulte também

Referência

SPMobileComponent De classe
SPMobileComponent Membros
Microsoft.SharePoint.MobileControls De espaço para nome