Compartir a través de


: SPMobilePageContents (Clase) (Microsoft.SharePoint.MobileControls)

Specifies the ID of the entry point <RenderingTemplate> that is used when rendering the main contents of a mobile Web page.

Espacio de nombres:
Ensamblado: Microsoft.SharePoint (in microsoft.sharepoint.dll)

Sintaxis

'Declaración
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level:=AspNetHostingPermissionLevel.Minimal)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level:=AspNetHostingPermissionLevel.Minimal)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
Public NotInheritable Class SPMobilePageContents
    Inherits SPMobileComponent
'Uso
Dim instance As SPMobilePageContents
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] 
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)] 
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] 
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)] 
public sealed class SPMobilePageContents : SPMobileComponent

Comentarios

For an overview of the role of this class in the page rendering system for mobile devices, see Sistema de representación de páginas móviles.

An SPMobilePageContents object appears in the <SPMobileForm> element of a mobile Web page. It specifies the entry point into the relevant portion of the MobileDefaultTemplates.aspx file located in C:\\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES.

If the page type is HomePage, the DefaultTemplateName property holds the ID of the <RenderingTemplate>. For all other page types, the TemplateName property holds the ID of the <RenderingTemplate>.

Ejemplo

The following excerpt from mbllists.aspx, the default home page for mobile Web sites in Windows SharePoint Services, shows a SPMobilePageContents in use.

<!-- Page declaration and other matter omitted -->
<SPMobile:SPMobileForm RunAt="Server" PageType="HomePage" Paginate="true">
  <!-- matter omitted -->
  <SPMobile:SPMobilePageContents RunAt="Server" />
</SPMobile:SPMobileForm>

Because the page type is a home page, the value of the DefaultTemplateName property, "MobileHomePageContents", identifies the entry point <RenderingTemplate> in MobileDefaultTemplates.aspx. The following excerpt from that file shows that the MobileHomePageContents <RenderingTemplate> calls a SPMobileWebContents control. It, in turn, identifies a more specific <RenderingTemplate> ID: Mobile_WebSiteType_HomePage_Contents, where WebSiteType is the value of the Name attribute of the Lenguaje de marcado de aplicaciones de colaboración (CAML) <Elemento Template (Sitio)> element (of the SharePoint WEBTEMP.XML file) for the current type of Web site. For example, the Name value for the blog site definition is "BLOG". Hence, the SPMobileWebContents object defines the following <RenderingTemplate> ID for a mobile blog home page.

Mobile_BLOG_HomePage_Contents

(For a custom site definition, WebSiteType is the value of the ID attribute of the <Elemento Template (Sitio)> element, not the Name attribute.)

If there is no<RenderingTemplate> with the specified name in an .aspx file in the ...\CONTROLTEMPLATES folder, the runtime uses the <RenderingTemplate> named Mobile_Default_HomePage_Contents. That <RenderingTemplate>, in turn, calls the Mobile_STS_HomePage_Contents <RenderingTemplate>, which essentially provides a list of lists for the site.

<SharePoint:RenderingTemplate RunAt="Server" ID="MobileHomePageContents">
  <Template>
    <SPMobile:SPMobileWebContents RunAt="Server" />
  </Template>
</SharePoint:RenderingTemplate>
<SharePoint:RenderingTemplate RunAt="Server" ID="Mobile_Default_HomePage_Contents">
  <Template>
    <SPMobile:SPMobileComponent RunAt="Server" TemplateName="Mobile_STS_HomePage_Contents" />
  </Template>
</SharePoint:RenderingTemplate>
<SharePoint:RenderingTemplate RunAt="Server" ID="Mobile_STS_HomePage_Contents">
  <Template>
    <mobile:Label RunAt="Server" Text="<%$Resources:wss, mobile_listcategory_geneliclists_text%>" BreakAfter="true" />
    <SPMobile:SPMobileListIterator RunAt="Server">
      <SPMobile:SPMobileList RunAt="Server" TemplateType="Announcements" />
      <!-- matter omitted -->
    </SPMobile:SPMobileListIterator>
    <mobile:Label RunAt="Server" Text="<%$Resources:wss, mobile_listcategory_documents_text%>"    BreakAfter="true" />
    <SPMobile:SPMobileListIterator RunAt="Server">
      <SPMobile:SPMobileList RunAt="Server" TemplateType="DocumentLibrary" />
      <!-- matter omitted -->
    </SPMobile:SPMobileListIterator>
    <mobile:Label RunAt="Server" Text="<%$Resources:wss, mobile_listcategory_pictures_text%>"    BreakAfter="true" />
    <SPMobile:SPMobileListIterator RunAt="Server">
      <SPMobile:SPMobileList RunAt="Server" TemplateType="PictureLibrary" />
    </SPMobile:SPMobileListIterator>
  </Template>
</SharePoint:RenderingTemplate>
<SharePoint:RenderingTemplate RunAt="Server" ID="Mobile_CENTRALADMIN_HomePage_Contents">
  <Template>
    <mobile:Label RunAt="Server" Text="<%$Resources:wss, mobile_sitetemplate_nosupport_text%>" BreakAfter="true" />
  </Template>
</SharePoint:RenderingTemplate>
<SharePoint:RenderingTemplate RunAt="Server" ID="Mobile_MPS_HomePage_Contents">
  <Template>
    <mobile:Label RunAt="Server" Text="<%$Resources:wss, mobile_sitetemplate_nosupport_text%>" BreakAfter="true" />
  </Template>
</SharePoint:RenderingTemplate>

Jerarquía de herencia

System.Object
   System.Web.UI.Control
     System.Web.UI.MobileControls.MobileControl
       Microsoft.SharePoint.MobileControls.SPMobileComponent
        Microsoft.SharePoint.MobileControls.SPMobilePageContents

Seguridad de subprocesos

Todos los miembros estáticos públicos (compartidos en Visual Basic) de este tipo son seguros para la ejecución de subprocesos. No se garantiza que los miembros de instancia sean seguros para los subprocesos.

Vea también

Referencia

SPMobilePageContents (Miembros)
Microsoft.SharePoint.MobileControls (Espacio de nombres)

Otros recursos

Sistema de representación de páginas móviles