Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 430287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:51:38+00:00 2026-05-12T19:51:38+00:00

I am totally new to Sharepoint (2007) so please bear with me. I would

  • 0

I am totally new to Sharepoint (2007) so please bear with me. I would like to automatically create aspx pages when a new site is created. These pages will be linked to through tabs which will be defined by a master page. I do not have a custom site definition and was planning to apply feature stapling to the out of the box blank site definition.

Through my research, I think you can create a web part page and turn this into a feature. I can then staple this to the blank site definition. The problem is I haven’t found any information on how to do this. So the two questions I have are:

  1. How do I create a feature that is just an aspx page?
  2. How do I staple this feature to a blank site definition?

I found one person asking the same question here: How to add a web part page to a site definition?
I read the first response but it sort of goes over my head and I don’t know if it really answers my question.

Thanks so much!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T19:51:38+00:00Added an answer on May 12, 2026 at 7:51 pm

    The answer to your first question depends on whether you mean application pages or content pages. They each have their advantages: application pages are good in that they can run custom server-side code, and content pages are nice because (for example) they can be customized by users, but by default are restricted in what kind of code can be run.

    For a pretty good discussion on the differences between the two types in capabilities and restrictions, check out the Windows SharePoint Services SDK and look at the topics called “Application _layouts page type” and “Content page type.”

    As for stapling, it’s pretty easy and more flexible than adding new features to a site definition’s onet.xml file. This article seems a pretty good overview of the alternatives. You might want to make a copy of the blank site definition, rename it, and then use that one in your work, though.

    Features with content pages

    You’ll need three types of things for this:

    1. A feature.xml file — just the boilerplate stuff that refers to the element manifest.
    2. A page template — this could be the entire aspx page itself, or it could be (for example) a shell of a web part page with WebPartZones defined but no actual web parts (yet).
    3. The element manifest file which refers to your page templates and defines any web parts that should be provisioned as part of activation of your feature.

    Your feature’s folder structure would look something like this:

    12
    +-- TEMPLATES
        +-- FEATURES
            +-- YourFeature
                +-- PageTemplates
                |   +-- Page.aspx (simple aspx page)
                |   +-- WebPartPage.aspx (still simple, but with WebPartZones)
                +-- feature.xml
                +-- elements.xml
    

    Feature.xml:

    <Feature 
      Id="CFF117BC-9685-4a7b-88D0-523D9DAD21F0"
      Title="Custom Pages Feature"
      Scope="Web"
      xmlns="http://schemas.microsoft.com/sharepoint/">
      <ElementManifests>
        <ElementManifest Location="elements.xml"/>
      </ElementManifests>
    </Feature>
    

    Elements.xml

    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
      <Module Path="PageTemplates" Url="Pages" >
        <File Url="Page.aspx" Type="Ghostable" />
        <File Url="WebPartPage.aspx" Name="WebPartPage.aspx" Type="Ghostable" >
          <AllUsersWebPart WebPartZoneID="Left" WebPartOrder="0">
            <![CDATA[         
                <WebPart xmlns="http://schemas.microsoft.com/WebPart/v2"
                         xmlns:cewp="http://schemas.microsoft.com/WebPart/v2/ContentEditor">
                    <Assembly>Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
                    <TypeName>Microsoft.SharePoint.WebPartPages.ContentEditorWebPart</TypeName>
                    <Title>Some content that you want to provision with the feature</Title>
                    <FrameType>TitleBarOnly</FrameType>
                    <cewp:Content>
                      Hello world.
                    </cewp:Content>
                </WebPart>
            ]]>
          </AllUsersWebPart>
        </File>
      </Module>
    </Elements>
    

    Page.aspx

    <%@ Page MasterPageFile="~masterurl/default.master" 
        meta:progid="SharePoint.WebPartPage.Document"  %>
    <asp:Content runat="server" ContentPlaceHolderID="PlaceHolderMain">
      Hello World
    </asp:Content>
    

    WebPartPage.aspx

    <%@ Page Language="C#" MasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:progid="SharePoint.WebPartPage.Document"   %>
    
    <%@ Register Tagprefix="WebPartPages" 
                 Namespace="Microsoft.SharePoint.WebPartPages" 
                 Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    
    <asp:Content ID="main" runat="server" ContentPlaceHolderID="PlaceHolderMain" >
    
    <table width="100%">
      <tr>
        <td valign="top" style="width:50%">
            <WebPartPages:WebPartZone ID="Left" runat="server" 
                          FrameType="TitleBarOnly" Title="Left Web Part Zone" />
        </td>
        <td valign="top" style="width:50%">
            <WebPartPages:WebPartZone ID="Right" runat="server" 
                         FrameType="TitleBarOnly" Title="Right Web Part Zone" />        
        </td>
      </tr>
    </table>
    
    </asp:Content>
    

    If you configure your feature in that way, you should be able to deploy site content pages within that structure.

    Also, I highly recommend Ted Pattison’s Inside Windows SharePoint Services book. It covers this topic in much detail, including the important security aspects of site content pages. It’s easily worth the purchase price.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Being totally new into node.js environment and philosophy i would like answers to few
I'm totally new to this WCF Services thing so any guidelines would be greatly
Totally new to Drupal so be gentle please! Let's say I have a number
This is a totally new area for me so please be patient. I want
Totally new to Kubuntu and KDevelop. I created a new No GUI(CMake) Simple CMake-based
I'm totally new to objective c and iphone development. I'm trying to create an
Im totally new to WCF. Trying to create a Silverlight application with WCF services.
I'm totally new to git and want to create a repository in a directory
I'm totally new to SharePoint but my company has adopted it for internal use.
I am totally new to sharepoint and just trying to get something up and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.