Tuesday, June 15, 2010

SharePoint Application Page with Custom Controls !




In this article, I will describe the use of Application Pages (_Layouts) and will
show you, step by step, how to build your custom Application Page with your own
Web Controls.


Usually, as a SharePoint developer, when we need to add specific business logic with
user interface to SharePoint application, we will create a Web Part. In many
cases web parts are great and also the best solution, but not always. It is important
to understand your business requirements and to find the best way to implement
it in SharePoint application.


Pages Types in SharePoint

First, let’s understand the main different between Application Pages and Content
Pages:



  • Content Pages – Contains content controls that can be modified by end users.

    ONLY Content Pages can contain Web Part Zones, therefore can contain Web Parts.


  • Application Pages – Are regular ASPX pages that exposed in every site collection or sub site under
    the _layouts folder.


When we understand these main differences it is easy to know when to use each page,
For example:


Scenario A - Content Pages

You need to create an RSS to show relevant content to users in a certain group and
you need to support customization by sites administrators and personalization
for end users.


Scenario B - Application Pages

Your company wants to provide a central page that displays the latest articles from
Eggheadcafe.com. This page will be available for company employees and could
not be configured by end users or sites administrators.


No comments:

Post a Comment