Compartilhar via


SPMobileWebUrlRedirect De classe

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.

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

A sintaxe

<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 SPMobileWebUrlRedirect
    Inherits SPMobileWebTemplateSelector
Dim instance As SPMobileWebUrlRedirect
[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 SPMobileWebUrlRedirect : SPMobileWebTemplateSelector

Comentários

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.

O PageType é o tipo de página, such as homepage ou NewForm.Mas normalmente homepage é o único tipo página que nunca precise redirecionar os dispositivos móveis.

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

A parte ** WebSiteType da identificação é determinado pelo SPContext quando o objeto SPMobileWebUrlRedirect T:Microsoft.SharePoint.MobileControls.SPMobileWebUrlRedirect é instanciado.

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 Colaboração Application Markup Language (CAML) <Elemento de modelo (site)> element (of the SharePoint WEBTEMP.XML file).Por exemplo, o valor nome para a definição site blog é "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 de modelo (site)> element (in a custom WEBTEMP*.XML file), not the Name attribute.Suppose you have a WEBTEMPMyCustomSiteDefinitions.XML file containing the following <Elemento de modelo (site)> element.

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

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

Mobile_10001_HomePage_Redirect

A seguinte é a parte do arquivo MobileDefaultTemplates.ascx (em C:\\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES) que controla o redirecionamento para dispositivos móveis.

Note that initially the MobileHomePageRedirect <RenderingTemplate> is called.Ele, por sua vez, chama o objeto SPMobileWebUrlRedirect T:Microsoft.SharePoint.MobileControls.SPMobileWebUrlRedirect.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 de modelo (site)>), then the page pointed to by that <RenderingTemplate> will be used instead of mbllists.aspx.

Hierarquia de herança

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

Segmento de segurança

Qualquer público estático ( compartilhadas Na Visual Basic) os membros desse tipo são segmento seguro. Os membros de instância não são garantia ser segmento seguro.

Consulte também

Referência

SPMobileWebUrlRedirect Membros
Microsoft.SharePoint.MobileControls De espaço para nome

Conceitos

WebTemp.xml
Como a: Personalizar a Mobile home page por meio de redirecionamento