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 8795935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:30:10+00:00 2026-06-13T23:30:10+00:00

How can I create a new sharepoint site based on a template after a

  • 0

How can I create a new sharepoint site based on a template after a new item is added to a list, for example I have the the sharepoint site “A” with a list with info about projects, and the idea is that after I add a new project to that list, I need to automatically create a new sharepoint site (teamspace) for that project.

Also I want to know if it is possible to create this using a workflow or maybe if I can call the webservice(c#) with the workflow.

  • 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-06-13T23:30:12+00:00Added an answer on June 13, 2026 at 11:30 pm

    Ok well first you have to create a sharepoint project with visual studio
    in there you can write c#

    to create a site in c#

     SPSite topLevelSite = new SPSite("http://localhost");
     SPWeb spWebInstance = topLevelSite.OpenWeb();
     String siteTemplate = spWebInstance.WebTemplate;
     try
     {
    SharePointWebInstance.Webs.Add("the name", "name", "new site added",    (UInt32)System.Globalization.CultureInfo.CurrentCulture.LCID, siteTemplate, false, false);
      }
     catch(Exception ex)
     {
      //...
     }
     finally
     {
     topLevelSite.Close();
     SharePointWebInstance.Dispose();
     }
    

    just to get you started, btw you cannt use c# if you only use sharepoint designer, c# is with visual studio.

    to retrieve something from a list

    using Microsoft.SharePoint;  
    
    
    class SPTest {  
    
    public void ReadList() {  
    
    // Use using to make sure resources are released properly  
    using(SPSite oSite = new SPSite(pathToSite)) {  
    using(SPWeb oWeb = oSite.AllWebs[nameOfWeb]) {   
      // Alternately you can use oSite.RootWeb if you want to access the main site  
    
      SPList oList = oWeb.Lists[listName];  // The display name, ie. "Calendar"  
    
      foreach(SPListItem oItem in oList.Items) {  
        // Access each item in the list...  
        DateTime startTime = (DateTime)oItem["Start Time"];  
        // etc....  
      }  
    
      }  
      }  
      }  
      } 
    

    just to get you started, i would recomend youtube to see how you can use sharepoint and visual studio together also, or better follow Microsoft offical course 10175A (i did)
    codes above where puled from the internet not from the book.

    i dont think its possible to do this with normal workflows, or with javascript despite some java code is verry powerfull with ajax etc. So you should spend the time of figuring this out within visual studio. (c# is not that hard to read, take your time)

    oh i see your using 2007, its less friendly to use from a programming viewpoint, if this code doesnt work on it i think its still close the way it can be done, just check object and what you do with it, it might slightly differ.

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

Sidebar

Related Questions

Is there any way that I can create a new delegate type based on
I have some code that creates a new site in SharePoint. Upon browsing to
In SharePoint I can create a list column of type 'Number'. I need to
Not sure where to begin. I have code setup to create a new site
I have created a webservice that can upload files to my sharepoint site library.
I have a sharepoint site and want to create a script for links with
I have created a custom list in a SharePoint site and generated a Visual
I can create new Silverlight App with .NET RIA Services enabled. But when I
i created an additional content type called clients where I can create new client
How can create a New user in ORACLE with full access (alter, delete, select,

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.