.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Create a Site template with subsites in Sharepoint Server 2010

Posted By:      Posted Date: September 07, 2010    Points: 0   Category :SharePoint
Hi, I'm with my first SharePoint project, and we are using server 2010 as a Document Management system. The thing is our company has about 300 customers, and we have to create 300 site collections, 1 per customer.  For each site collection, I use the blank site template, and it's very simple page, as I just need a document library in the home page, and then I need to create a subsite called "cases" and the inside profiles, the users create a document library for each case. For subsite I mean, I create a new site and I choose the option to share the top menu, so basically the site has 2 tabs. So basically what I need is a template that has 2 tabs, Home and Cases. Home with a document library in home and Cases empty. Is there a simple way to achieve this? I guess maybe I have to edit some XML files to create a Site Template. If this is the case, can someone point me to the right documentation. Second, I need to create a Visual Basic project so that the final user has a form, and he just inputs the Customer Name and the code must automatically create a new site with the template I metioned before. I guess that once I have the template this won't be very hard to achieve, as I have seen this SPSite class. The question is, can I have the template with the 2 tabs, o maybe I have to use 2 templates, and write code to create the home site and the Cases Subsite.. Ple

View Complete Post

More Related Resource Links

How can create site in sharepoint foundation 2010 based on WSS 3.0 template(.stp file)

Hi,   I  want  to migrate wss3.0  site into sharepoint foundation 2010 site . earlier we  were creating site based on .stp file  in WSS 4.0 . but now we  have   to build same site in sharepoint foundation 2010. I followed  the old way  intall the .stp file  and  based on that trying to create new  site  but getting some error  old version template is not supporetd my this version. how could  l able to create  site  in sharepoint foundation 2010 based on wss 3.0 template . Please help Thanks in advance Jandel Singh

How can create site in sharepoint foundation 2010 based on WSS 3.0 template(.stp file)

Hi,   I  want  to migrate wss3.0  site into sharepoint foundation 2010 site . earlier we  were creating site based on .stp file  in WSS 4.0 . but now we  have   to build same site in sharepoint foundation 2010. I followed  the old way  intall the .stp file  and  based on that trying to create new  site  but getting some error  old version template is not supporetd my this version. how could  l able to create  site  in sharepoint foundation 2010 based on wss 3.0 template . Please help Thanks in advance Jandel Singh

Create site template and adding subsite using site template is broken in sharepoint 2010

I am trying to create a site template base on an existing site and try to use the new site template to generate other sub-sites.  It sounds simple and the code is not that difficult to follow; however, Microsoft has made it impossible to accomplish by having a bug in their template creation process.   //Generate web template from existing website using (SPSite site = new SPSite("http://localhost")) { SPWeb web = site.OpenWeb("/barrington/accounting"); web.SaveAsTemplate("NewDepartmentTemplate", "NewDepartmentTemplate", "NewDepartmentTemplate", true); }   //Generate sub site using the new template using (SPSite site = new SPSite("http://localhost")) { SPWeb web = site.OpenWeb("/barrington/accounting"); SPWebTemplate tp = null; foreach (SPWebTemplate wt in web.GetAvailableWebTemplates((uint)1033)) { if (wt.Title == "NewDepartmentTemplate") { tp = wt; break; } } if (tp != null) { SPWeb newWeb = web.Webs.Add("NewDepartment", "NewDepartment", "NewDepartment", (uint)1033, tp, false, false); } } Error: Microsoft.SharePoint.SPException was unhandled   Message=The content type name '$Resources:_FeatureId367b94a9-4a15-42ba-b4a2-32420363e018,DataSourceContentTypeName;' cannot contain: \  / : * ? " # % < > { } | ~ & , two consecutive per

When Upgraded a site from Wss 3.0 to Sharepoint foundation 2010, subsites are not working

HI ALL, I recently migrated an old Sharepoint site from WSS 3.0 to Sharepoint foundation 2010. There were no problems during the upgrade and the stsadm command displayed the message that upgrade completed successfully. However when I am accessing the sub-sites from outside the server, I am able to see the content, but when I go to Site Settings, I get an error "File not found". Also the Views for the sub-sites are not working. However on accessing the sub-sites from the Server everything is working fine. Can anyone please help me?  

Adding a custom control to the SharePoint 2010 Team Site Wiki Page Template ( wkpstd.aspx ) programm

Topic This is maybe my last post about the Team Site Wiki Page customization with the aim of exceeding its limitations. This time we are going to customize the unique template ( wkpstd.aspx) by replacing the control that renders the editable content by a custom one. In this post example, we will take advantage of the use of this custom control to render not editable additional contents, for instance, a header and a footer that could be the same for a specific Wiki Page Library. Of course, we are not going to really customize the template, but we are going to use a delegate control to replace the control at runtime. Here are the screen shots of the result: We can see a non editable Header and Footer on the Team Site Wiki Page In edit mode these additional contents are not rendered, but we can add new content as usual And of course, after having saved the page, the new content is rendered wtih the non editable Header and Footer. Steps required   If you look at the Team Site Wiki Page template, wkpstd.aspx, you can see the control that is rendering the editable content/ <SharePoint:EmbeddedFormField ID="WikiField" FieldName="WikiField" ControlMode="Display" runat="server" /> We are first going to create a custom EmbeddedFormField control Then, we are going to use a delegate control to replace the native EmbeddedFor

Cannot publish InfoPath 2010 form template to SharePoint Server 2010 RC

Hi all, I am MSFT in Vietnam. I created a SharePoint list using InfoPath 2010 RTM 64bit. After publishing it to SharePoint 2010 RC, I see an error message:  Click on button "Show Details" the message is The list schema does not match the schema of this form. Refresh the data source and publish the form again. When I create new item based on published SharePoint list, I can see plain form not browser enabled InfoPath form. I checked InfoPath Form Services, everything seems to be good. What should I do to publish SharePoint list from InfoPath 2010 to SharePoint 2010 as browser enabled form?

Purpose of initial "site" in SharePoint Server 2010 Express Install

I’m installing Search Server 2010 Express using “Farm” mode. After the SharePoint Configuration Wizard completes, and selecting  the SharePoint config wizard, one needs to create a website. What is that site intended for? Is it for the Search Center itself? (If so, then I better select the Enterprise – “Basic Search Center" template. If it is intended for a "normal" top level site, then I will create a new Search site in its own web app). TIA, Barkingdog  

SharePoint Server 2010 - Create Meeting Workspace from Outlook

Does the feature to creat a meeting workspace from Outlook's calendar exist in SharePoint Server 2010?

Creating a new site sharepoint 2010 under parent site with my custom template Programatically using

Hi, I have a parent website under which i want to create subsites on the fly using visual studio 2010. The subsites which i want to create have a common stuructre(in temrs of lists & custom). So i saved the template in sharepoint 2010,it becomes wsp and goes into soution gallery. Now how do i use this template say mytemplate.wsp,to create site in visual studio. i tried this using (SPSite site = new SPSite ("http://infml01132:5566/sites/VRND " ))             {                 using (SPWeb web = site.OpenWeb())                 {                                       SPWebTemplateCollection myTemplates = site.GetCustomWebTemplates(Convert .ToUInt32(web.Locale.LCID));                     //SPWebTemplateCollection temlates1 = site.GetCustomWebTemplates(1033);                     //SPWebTemplateCollectio

Create Lookup Site Column based on External List (SharePoint 2010)


I've got an External List and I want to create a Site Column, which is Lookup to a column in my external list. If I tick any of the columns in 'Add a column to show each of these additional fields' and click OK i get the following error message:

[NullReferenceException: Object reference not set to an instance of an object.]
  Microsoft.SharePoint.SPBusinessDataField.IsInDefaultView() +58
  Microsoft.SharePoint.SPBusinessDataField.CreateSpFieldForBdcType(String bdcName, Boolean hidden, Boolean readOnly, Boolean idField, SPAddFieldOptions op) +809
  Microsoft.SharePoint.SPBusinessDataField.AddNeededSecondaryFields(String wssNames, String[] oldNames, String[] newNames, SPAddFieldOptions op) +315
  Microsoft.SharePoint.SPBusinessDataField.OnAdded(SPAddFieldOptions op) +240
  Microsoft.SharePoint.SPFieldCollection.AddFieldAsXmlInternal(String schemaXml, Boolean addToDefaultView, SPAddFieldOptions op, Boolean isMigration, Boolean fResetCTCol) +759
  Microsoft.SharePoint.SPFieldCollection.Add(SPField field) +61
  Microsoft.SharePoint.ApplicationPages.FieldNewPage.Save() +513
  Microsoft.SharePoint.ApplicationPages.FieldNewPage.BtnOk_Click(Object sender, EventArgs e) +46
  System.Web.UI.WebControls.Button.OnClick(EventArgs e) +114
  System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +139

Sharepoint 2010 Cannot create new List using saved List template

In Sharepoint Server 2010 Cannot create new List using saved List template. I have saved multiple list templates in the template gallery, but when I click on site actions -> More options. I do not see the list templates that are in the template gallery.

SharePoint / Project Server 2010 Unable to edit a HTTPS site in SharePoint designer 32 bit



I posted this thread below under a different forum and was requested to move.  Below is our current problem and the feedback that was given.

We currently have a project server 2010 site with several workspaces associated with it.  When trying to edit the site (either from choosing edit is designer from the site actions or from trying to open from within the designer) a dialog appears asking to choose a certificate for the site.domain.com.

The certificate issued by the site is a GeoTrust certificate and checks ok when browsing the site in IE.  This Windows security dialog also appears when trying to export to excel on the same site.

Any thoughts to what we are missing?




Dear Partner,


Thank you for posting in our Partner Online Technical Community.



SharePoint 2010 team site "Save site as template " not available



I have a newly created site based "Team Site" template. Now I want to export this as a site template and use it as base in my Visual Studio 2010. Now I am not able to see the command "Save site as template " in site settings of that team site. What I am missing here ?

But I get same "Save site as template " when I create a site based on "Blank Site" template.


How to create a new site collection in Sharepoint 2010?



How to create a new site collection in Sharepoint 2010 from Central Administration ?

SharePoint Server 2010 Site Suddenly Dissapeared - 404 Error


I created a site in a brand new SharePoint Server 2010 environment.  Now when I browse to the site, I get a 404 error.  The site has suddenly vanished. The link to the site still remains in SharePoint, but it's not there!  I tried running the SP Prod and Tech Config Wizard, rebooting, etc...

No one is even using this environment.

Any ideas?

Did anyone at Microsoft test SharePoint Server or Project Server before launch?  This 2010 release is so full of bugs.  Sorry to rant.

SharePoint 2010 Site Template forces personal storage? (Using SimplePublishing GhostableInLibrary)


I have a major issue with a project I am working on.

First off, I need to have shared storage for the site, so once an administrator adds a web part and configures it properly, it'll show to the end users as well.

Seconly, I need to have a navigation that displays the pages the site contains.

I've tried to search help using Google, but I can't seem to be able to figure out the magic words to find anything useful.

Here's the onet.xml if someone is able to tell what I am doing wrong:

<?xml version="1.0" encoding="utf-8"?>
<Project Title="test3" Revision="2" ListDir="" xmlns:ows="Microsoft SharePoint" xmlns="http://schemas.microsoft.com/sharepoint/">
  <Configuration ID="0" Name="test3">
    <!-- Navigation Feature -->
    <Feature ID="541F5F57-C847-4e16-B59A-B31E90E6F9EA">
     <Properties xmlns="http://schemas.microsoft.com/sharepoint/">
      <Property Key="IncludeSubSites" Value="true" />
      <Property Key="IncludePages" Value="true" />
      <Property Key=&q

Activating Publishing Feature for Team Site Template in SharePoint 2010


A new site collection has been created and uses SharePoint 2010 team site template. How can you activate the publishing feature on it?


I have activated the publishing feature at site collection and site level but I still can edit pages etc without requiring check out and approval/publishing. There are probably settings I need to activate on other doc libraries but I wanted to know the best practice for this scenario and how to configure it.



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend