다음을 통해 공유


SPMobilePageNavigation Class

Specifies the ID of the entry point <RenderingTemplate> that is used when rendering the navigation (footer) area of a mobile Web page.

Inheritance Hierarchy

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

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

Syntax

'Declaration
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public NotInheritable Class SPMobilePageNavigation _
    Inherits SPMobileComponent
'Usage
Dim instance As SPMobilePageNavigation
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class SPMobilePageNavigation : SPMobileComponent

Remarks

For an overview of the role of this class in the page rendering system for mobile devices, see Mobile Page Rendering System.

An SPMobilePageNavigation object appears in the <FooterTemplate> element of a mobile Web page. It specifies the entry point into the relevant portion of the MobileDefaultTemplates.ascx file located in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\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>.

Examples

The following excerpt from mbllists.aspx, the list-of-lists page for mobile Web sites, shows an SPMobilePageNavigation object in use.

<!-- Page declaration and other matter omitted -->
<SPMobile:SPMobileForm RunAt="Server" PageType="HomePage" Paginate="true">
  <DeviceSpecific>
    <Choice>
      <!-- matter omitted -->
      <FooterTemplate>
        <SPMobile:SPMobileControlContainer RunAt="Server" Weightless="true">
          <SPMobile:SPMobileComponent RunAt="Server" Templatename="MobilePaginateNavigation" />
          <SPMobile:SPMobileComponent RunAt="Server" TemplateName="MobileDefaultSeparator" />
          <SPMobile:SPMobilePageNavigation RunAt="Server" />
        </SPMobile:SPMobileControlContainer>
      </FooterTemplate>
    </Choice>
  </DeviceSpecific>
  <SPMobile:SPMobilePageContents RunAt="Server" />
</SPMobile:SPMobileForm>

Because the page type is a home page, the value of the DefaultTemplateName property, "MobileHomePageNavigation", identifies the entry point <RenderingTemplate> in MobileDefaultTemplates.ascx. The following excerpt from that file shows that the MobileHomePageNavigation <RenderingTemplate> calls a SPMobileWebNavigation control.

<SharePoint:RenderingTemplate RunAt="Server" id="MobileHomePageNavigation">
  <Template>
    <SPMobile:SPMobileWebNavigation RunAt="Server" />
  </Template>
</SharePoint:RenderingTemplate>

The SPMobileWebNavigation control, in turn, simply identifies a more specific <RenderingTemplate> ID: IntendedPageUse_WebSiteType_HomePage_Navigation, where the placeholders IntendedPageUse and WebSiteType are defined as in Mobile Page Rendering System.

If no<RenderingTemplate> with a matching ID exists in some .ascx file in the ...\CONTROLTEMPLATES folder, it will use the <RenderingTemplate> named IntendedPageUse_Default_HomePage_Navigation.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

SPMobilePageNavigation Members

Microsoft.SharePoint.MobileControls Namespace

Other Resources

Mobile Page Rendering System