Adding a Custom aspx Page to Sharepoint 2007

To Create and add the custom.aspx Page in sharePoint 2007 as Solution Package
see the Post : Create and Deploy Custom aspx Page as Feature and Solution Package of SharePoint 2007

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

Create and Deploy Custom aspx Page as Feature and Solution Package of SharePoint 2007