The developers might be surprised that the only difference
between an ASP.NET page and a SharePoint page is what it is being inherited
from. Normal ASP.NET pages are inherited from System.Web.UI.Page
while SharePoint Pages are inherited from Microsoft.SharePoint.WebPartPages.WebPartPage.
Developers may have noticed that while they are developing Web Parts they
normally inherit from Microsoft.SharePoint.WebPartPages.WebPart.
So, while developing anything specific for SharePoint, you would inherit from
objects provided under Microsoft.SharePoint.WebPartPages.
If you look at the inheritance hierarchy for WebPartPage, it is inherited from
System.Web.UI.Page (the one that is inherited from
for ASP.NET pages).
System.Object
System.Web.UI.Control
System.Web.UI.TemplateControl
System.Web.UI.Page
Microsoft.SharePoint.WebPartPages.WebPartPage
So, how do we create a SharePoint Portal Page and include it
in our Portal? The first step is to create the Page.
Steps to create SharePoint Portal Page
·
Normally, I just create a web site on my machine with an appropriate
name.
·
Add a reference to the Microsoft.SharePoint
Assembly.
·
Add a Web Page.
·
Change the inheritance from System.Web.UI.Page
to Microsoft.SharePoint.WebPartPages.WebPartPage.
·
From here on you can just design the page as you want and add
functionality to the page. The design of the page and functionality code is not
separate from normal ASP.NET pages.
·
Compile the project. This will create the assembly file you need
to use in SharePoint Portal.
The next major
task is how to include it in SharePoint Portal. The steps required to
incorporate the page in your Portal site are the following.
·
Copy the Page to one of the templates folder that will use the
Portal Page.
·
Add reference to the Onet.xml file.
·
Copy the assembly file to bin folder of the Portal.