(SPWebApplication.SPCustomPage) del método SPWebApplication.GetMappedPage

Devuelve la ubicación de la página de aplicación personalizada.

Espacio de nombres:  Microsoft.SharePoint.Administration
Ensamblado:  Microsoft.SharePoint (en Microsoft.SharePoint.dll)

Sintaxis

'Declaración
Public Function GetMappedPage ( _
    key As SPWebApplication.SPCustomPage _
) As String
'Uso
Dim instance As SPWebApplication
Dim key As SPWebApplication.SPCustomPage
Dim returnValue As String

returnValue = instance.GetMappedPage(key)
public string GetMappedPage(
    SPWebApplication.SPCustomPage key
)

Parámetros

Valor devuelto

Tipo: System.String
La ubicación de la página de aplicación personalizada. En caso contrario, una referencia null (Nothing en Visual Basic).

Ejemplos

En el ejemplo de código siguiente se muestra cómo recuperar la asignación de la página de aplicación con un objeto de la enumeración SPWebApplication.SPCustomPage .

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;

namespace GetCustomAppPage
{
    class Program
    {
        static void Main(string[] args)
        {
            using (SPSite site = new SPSite("https://localhost"))
            {
                //Get a reference to the web application.
                SPWebApplication webApp = site.WebApplication;

                //Output the name of the custom application page.
                Console.Out.WriteLine(webApp.GetMappedPage(SPWebApplication.SPCustomPage.AccessDenied));
                
                Console.Out.WriteLine("Press any key...");
                Console.ReadKey();
            }
        }
    }
}
Imports System
Imports Microsoft.SharePoint
Imports Microsoft.SharePoint.Administration
Module Module1

    Sub Main()

        Using site As New SPSite("https://localhost")

            'Get a reference to the web application.
            Dim webApp As SPWebApplication = site.WebApplication

            'Output the newly assigned application page.
            Console.Out.WriteLine(webApp.GetMappedPage(SPWebApplication.SPCustomPage.AccessDenied))

            Console.Out.WriteLine("Press any key...")
            Console.ReadKey()
        End Using

    End Sub

End Module

Vea también

Referencia

clase SPWebApplication

Miembros SPWebApplication

Sobrecarga GetMappedPage

Espacio de nombres Microsoft.SharePoint.Administration