Adding a Custom aspx Page to Sharepoint

To Create and add the custom.aspx Page in sharePoint 2007 as Solution Package see the Post : Creating and Deploying Custom aspx Page as Solution Package

To Create and Add Custom aspx Page in SharePoint 2010 see : Add Custom aspx Page in Sharepoint 2010

To display your custom aspx page in SharePoint Context i.e with SharePoint master Page and left navigation ... you need to make below changes in your aspx page.

Steps are :

1. Add the references for various sharepoint assemblies.

2. wrap the code(javascript,controls..) in PlaceHolderMain so that it gets displayed as a content page.

3. Switch the master page in pageinit() method in code behind. // if you need to switch it to your own custom master page.



See the image below for aspx changes



In addition to the the PlaceHolderMain, add two more placeholders with the id as PlaceHolderPageTitle and PlaceHolderPageTitleInTitleArea


To swicth the master page in code behind see below



To Create and add the custom.aspx Page in SharePoint 2007 as Solution Package see the Post below

Creating and Deploying Custom aspx Page as Solution Package

For SharePoint 2010 see : Add Custom aspx Page in Sharepoint 2010

1 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete

Disclaimer

This is a personal weblog. The opinions expressed here represent my own and not those of my employer or anyone else. Should you have any questions or concerns please e-mail me at sharepointprogrammingblogger@gmail.com .

Copyright (c) 2010 @ myshaepointwork.blogspot.com. All rights are reserved.Do Not Copy.

@ Learning SharePoint.com