Monday, 10 October 2011

Add Custom aspx pages in Central Administration Site - SharePoint


In this post we will discuss a little about creating adding a new aspx page in Central admin site.

First a little background -

The SharePoint Foundation Central Administration Web site uses a virtual directory named /_admin that is similar to the /_layouts virtual directory of content sites. The administrative virtual directory is mapped physically to the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\\Template\Admin directory, which is where you can place custom administration pages. Pages that are located in this directory are associated with the configuration database and not with the content database.To ensure consistency across all administration pages, SharePoint Foundation provides a master page (admin.master) that defines page layout.

So in order to create or add a new page in central admin site, you need to modify the aspx of the Page to add some predefined placeholders.

High- Level Steps to add a Page.

1. Create a VS 2010 enpty Project.
2. Add a SharePoint Mapping to the Admin directory in 14 hive.
3. Add a new item in Admin directory ( Text type -> rename to customadminPage.aspx)
4. Next modify the aspx to add the following placeholders

PlaceHolderPageTitle The title that is displayed in the top browser bar.
PlaceHolderPageTitleInTitleArea The title that is displayed in large black text on the rendered page.
PlaceHolderAdditionalPageHead Additional items to be placed within the tag of the page, which provides an ideal location for client-side script on the page.
PlaceHolderPageDescription The page description.
PlaceHolderMain The location where most of the derived page content is placed.

5. Once done deploy the solution by F5.
6. Next navigate to central admin site and go to http://centraladminsite/_admin/customadminPage.aspx

Ads by Google

No comments:

Post a Comment