SPWebApplication.GetMappedPage Method (String)

Returns the location of the customized application page.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

public string GetMappedPage(
	string page


Type: System.String

The location of the default application page.

Return Value

Type: System.String
The location of the customized application page. Otherwise, a null reference (Nothing in Visual Basic).

The following code sample shows how to retrieve the custom page mapping based on the default application page location.

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

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

                //Output the custom application page location.
                Console.Out.WriteLine("Press any key...");