Application pages are used to support application implementations in SharePoint Foundation. Application pages are stored on the file system of the front-end Web server in the %ProgramFiles%Common FilesMicrosoft Sharedweb server extensions14TEMPLATELAYOUTS directory and exist for every site in a Web application. This folder is mapped to an Internet Information Services (IIS) virtual directory called _layouts. Every site and subsite will have access to the application pages by using the _layouts virtual directory.
For example,http://myserver/_layouts/settings.aspx and http://myserver/subsite/_layouts/settings.aspx access the same application page on the front-end Web server unlike site pages, which is an instance for the specified site? Application pages are not subject to the same restrictions as site pages. They allow in-line code without restriction. They cannot, however, use dynamic Web Parts or Web Part zones or be modified using SharePoint Designer. Modifying the default application pages is not supported in SharePoint Foundation. Custom application pages can be added to a subdirectory inside the _layouts folder.
Desired to gain proficiency on SharePoint? Explore the blog post on the "SharePoint Training" course to become a pro in SharePoint.
Application Pages Vs Site Content Pages Vs Custom aspx Pages Application Pages:
An application page is deployed once per Web server and cannot be customized on a site-by-site basis. Application pages do not support customization, which gives them a few distinct advantages over site pages.
Advantages: - Application pages are not tracked in the content database. - They never run in safe mode and they can contain inline code. - Each application page is always compiled into a single assembly DLL so that it performs and scales better than site pages that can be customized. - Since application pages must be deployed inside the SharePoint Root directory, they cannot be used within sandboxed solutions. If you are required to build a SharePoint solution that targets the sandbox, the only type of page that you can add to a site is a site page They stay in the 12/14 hive folder structure, mostly under the layouts folder, and are used by all the sites and site collections for that server They do support code behind and inline scripts
They do not inherit the websites' current master page. They will always inherit from the application. master. Site Pages:
These are pages that make up the site interface and are specific to one site or site collection. Site pages support page customization through the browser and with SharePoint. Examples of site pages include the home page (default.aspx) for a site, as well as the pages associated with lists and document libraries, such as AllItems.aspx, NewForm.aspx, and EditForm.aspx Customized site pages run in safe mode and, consequently, do not support inline code. To process the request for a customized site page, SharePoint Foundation must retrieve the content of pages from across the network in the content database. SharePoint Foundation must also parse each customized site page individually, as well as execute it in a special no-compile mode. Since each customized page instance must be loaded separately into memory, it will affect the performance of a large server farm. They mostly get stored in the content database of the site collection They do not support code behinds. We can only add Web Part zones to the site pages They inherit the custom look and feel of the site. Custom aspx Pages:
These are the pages that are added via feature andor solution package for a specific purpose or function. If deployed in the Layouts folder the remain uncustomized thus do not get stored in the Content database. They can have a code-behind and inline scripts. The code-behind the file is not deployed though They do inherit the Look and feel of the site they are deployed in. You will have to specify the URL of the Custom master page while deploying them. Developers usually deploy them in the Layouts folder.
Creating a Custom Application Page using Visual Studio 2010 Creating Empty SharePoint Project:
Name it as CustomApplicationPage.
Select Application Page from the installed templates SharePoint and name it as CustomApplicationPage.
Testing:
A new custom application page has been created in SharePoint 2010 as shown below.
For an in-depth understanding of SharePoint click on:
You liked the article?
Like: 0
Vote for difficulty
Current difficulty (Avg): Medium
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.