Search code examples
sharepoint-2010fileprovisioning

How to add bunch of aspx files to a site definition sp2010 vs2010 project


I need to be able to deploy bunch of aspx files when a site (sub-site aka web) is provisioned. I added a feature but it seems whole feature thing has changed with vs 2010 or sp2010. I am totally lost. All I want to do is to deploy these pages when a web is provisioned. Is it possible?


Solution

  • You can't drop aspx pages into SharePoint per say. If you want to add functionality, some of the options are:

    1) Using Web Parts - probably the most popular method

    2) User Controls

    At the end of the day, you will create it as a Feature using VSeWSS 3.0 in VS and packaging/deploying it as a solution. Steer clear of trying to hack this up in SharePoint Designer - for one, you won't have source control like you have with a Feature.

    http://www.andrewconnell.com/blog/articles/UsingCodeBehindFilesInSharePointSites.aspx

    http://www.codersbarn.com/?tag=/webpart