SPMobilePageTitle Class

Specifies the ID of the entry point <RenderingTemplate> that is used when rendering the title 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.SPMobilePageTitle

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 SPMobilePageTitle _
    Inherits SPMobileComponent
'Usage
Dim instance As SPMobilePageTitle
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class SPMobilePageTitle : 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 SPMobilePageTitle object appears in the <HeaderTemplate> 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 in SharePoint Foundation, shows a SPMobilePageTitle in use.

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

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

<SharePoint:RenderingTemplate RunAt="Server" id="MobileHomePageTitle">
  <Template>
    <SPMobile:SPMobileWebTitle RunAt="Server" />
  </Template>
</SharePoint:RenderingTemplate>

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

If the runtime does not find a <RenderingTemplate> with a matching name in an .ascx file in the ...\CONTROLTEMPLATES folder, it uses the <RenderingTemplate> named IntendedPageUse_Default_HomePage_Title.

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

SPMobilePageTitle Members

Microsoft.SharePoint.MobileControls Namespace

Other Resources

Mobile Page Rendering System