Compartir a través de


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

Specifies, for a particular Web type (such as BLOG, WIKI, STS, MPS, or a custom Web type), the ID of the <RenderingTemplate> that identifies the file that serves as the site's home page for mobile devices.

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

Sintaxis

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

Comentarios

The <RenderingTemplate> ID has the following form.

Mobile_WebSiteType_PageType_Redirect

The "Mobile" is a prefix that indicates that the <RenderingTemplate> is for mobile Web sites.

The PageType is the type of page, such as HomePage or NewForm. But ordinarily HomePage is the only page type that ever needs to redirect mobile devices.

The "Redirect" indicates that <RenderingTemplate> identifies the URL of the page to which the mobile device should be redirected.

The WebSiteType portion of the ID is determined by the SPContext when the SPMobileWebUrlRedirect object is instantiated.

For built-in Web site types that ship with Windows SharePoint Services 3.0, the 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 example, the Name value for the blog site definition is "BLOG". Hence, the SPMobileWebUrlRedirect object defines the following <RenderingTemplate> ID for a mobile blog home page.

Mobile_BLOG_HomePage_Redirect

For custom site definitions, the WebSiteType portion of the <RenderingTemplate>'s ID is the value of the ID attribute of the <Elemento Template (Sitio)> element (in a custom WEBTEMP*.XML file), not the Name attribute. Suppose you have a WEBTEMPMyCustomSiteDefinitions.XML file containing the following <Elemento Template (Sitio)> element.

<Template Name="MyFirstCustomSiteDefinition" ID="10001"> 

The SPMobileWebUrlRedirect object defines the following <RenderingTemplate> ID for the mobile home page.

Mobile_10001_HomePage_Redirect

The following is the portion of the MobileDefaultTemplates.ascx file (in C:\\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES) that controls redirection for mobile devices.

Note that initially the MobileHomePageRedirect <RenderingTemplate> is called. It, in turn, calls the SPMobileWebUrlRedirect object. If the context is a BLOG site, the SPMobileWebUrlRedirect object defines Mobile_BLOG_HomePage_Redirect as the next <RenderingTemplate> to call and the mobile device is redirected to bloghome.aspx. In all other cases, if there are no custom site definitions, no <RenderingTemplate> with the name Mobile_WebSiteType_HomePage_Redirect (where WebSiteType is a Web site type other than BLOG) is found. So the <RenderingTemplate> named Mobile_Default_HomePage_Redirect is used, and it redirects the mobile device to mbllists.aspx.

<SharePoint:RenderingTemplate RunAt="Server" ID="MobileHomePageRedirect">
  <Template>
    <SPMobile:SPMobileWebUrlRedirect RunAt="Server" />
  </Template>
</SharePoint:RenderingTemplate>
<SharePoint:RenderingTemplate RunAt="Server" 
  ID="Mobile_Default_HomePage_Redirect">
  <Template>
    <SPMobile:SPMobileUrlRedirection RunAt="Server" 
      PageFilename="mbllists.aspx" />
  </Template>
</SharePoint:RenderingTemplate>
<SharePoint:RenderingTemplate RunAt="Server" 
  ID="Mobile_BLOG_HomePage_Redirect">
  <Template>
    <SPMobile:SPMobileUrlRedirection RunAt="Server" 
      PageFileName="bloghome.aspx" />
  </Template>
</SharePoint:RenderingTemplate>

If there is a custom *.ascx file in the ...\CONTROLTEMPLATES folder that contains a <RenderingTemplate> with the name Mobile_WebSiteType_HomePage_Redirect (where WebSiteType is the ID number of a custom <Elemento Template (Sitio)>), then the page pointed to by that <RenderingTemplate> will be used instead of mbllists.aspx.

Jerarquía de herencia

System.Object
   System.Web.UI.Control
     System.Web.UI.MobileControls.MobileControl
       Microsoft.SharePoint.MobileControls.SPMobileComponent
         Microsoft.SharePoint.MobileControls.SPMobileTemplateSelector
           Microsoft.SharePoint.MobileControls.SPMobileWebTemplateSelector
            Microsoft.SharePoint.MobileControls.SPMobileWebUrlRedirect

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

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

Otros recursos

WebTemp.xml
Cómo: Personalizar la página principal móvil mediante redireccionamiento