Monday, October 21, 2013

Creating Custom Application Page in SharePoint 2010 or 2013



There are 2 types of Pages in SharePoint 

1. Application Page
2. Site Pages

Site Pages can be customized but Application pages cannot be customized. Site Pages are stored in Content Database while Application pages are stored in 12/14/15 hive file path(Layouts folder). Application will be displayed much faster that Site Pages.Moreover, Application pages can be used across all sites within your SharePoint farm

Basically the application pages are used for modifying server configurations. Sometimes you may get a requirement to create page like asp.net page in SharePoint and place the link in central administration area. 

Create an Application Page using Visual Studio in few steps.

Start Visual Studio 2010/2012

Select New Empty Project

Add New Item -> Add Application Page from Templates

Rename the folder as SampleApplicationPage and ASPX page. Design the layout and Add Code behind files

For testing, Open the ASPX page and add a simple label control to the page with in-line coding style.

<asp:Label Text="Sample Appication Page" runat="server" ></asp:Label>

Save Project and Build and Deploy

Test the Page

http://site/_layouts/SampleApplicationPage/SampleApplicationPage .apsx

You will get Sample Application Page as an Output.

You can place other controls and add the code according to your requirement and use in your project.


No comments:

Post a Comment