Share via


Propriedade SPMobilePageContents.TemplateName

Gets the value of the ID attribute of the <RenderingTemplate> element that defines the rendering of the page's main content area when the control in Não Sobre o home page em um site móvel.

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

A sintaxe

  Public Overrides ReadOnly Property TemplateName As String
Dim instance As SPMobilePageContents
Dim value As String

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

A propriedade Value

Um String que representa a identificação do modelo para de conteúdo principal da página de área.

Comentários

A seguinte tabela mostra o valor dessa propriedade para os tipos diferentes página de um site móvel.

Tipo de Página

Processamento de modelo

Modo de Exibição de Lista

"MobileViewContents"

Modo de exibição de lista em uma subpasta

"MobileViewContents"

Formulário de novo item

"MobileNewFormContents"

Editar Formulário

"MobileEditFormContents"

Excluir Forma do item

"MobileDeletePageContents"

Exibir formulário do item

"MobileDispFormContents"

Each of these strings is the value of the ID attribute of a <RenderingTemplate> element in the file MobileDefaultTemplates.ascx located in C:\\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES.

Você não deve modificar MobileDefaultTemplates.ascx.To customize the rendering of a page's main content area for a particular page type (such as the List View type), 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.De exemplo, você pode adicionar seu nome da empresa ao final de identificação, such as "MobileViewContentsMyCompanyInc".Then derive a new class from SPMobileComponent, (the same parent as SPMobilePageContents) and override its TemplateName property so that it returns your custom ID when the page's PageType value is PAGE_VIEW.Add an object of the new class to the <SPMobileForm> element of a mobile Web page.

Contrast the TemplateName property with the DefaultTemplateName property which specifies the <RenderingTemplate> when the page é o home page do site móvel.

Consulte também

Referência

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