Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

Automatically Create Sites

  Asked By: Morgan Curry         Date: Dec 22, 2003      Category: Sharepoint      Views: 311
 

Does any one know of a way to automatically create team sites either
through code or through sharepoint itself. I have a large client
database and would ideally like to create a site for each client
without doing it my hand.

Also I have a template that I would like each to use.

Tagged:      

 

4 Answers Found

 
Answer #1       Answered By: Felix Hardy          Answered On: Dec 22, 2003       

What is the catalyst/event that would cause the creation of the new
site? You can use the SharePoint API to create  a new site.

 
Answer #2       Answered By: Jaime Sims          Answered On: Dec 22, 2003       

I just want to run a one of program. I found this and think it might
work

SPSite siteCollection = new SPSite("http://localhost");
SPWebCollection sites  = siteCollection.AllWebs;
sites.Add(<path>,<name>,<description>,1033,<template>,true,false);

I want to use my own template  as in a .stp file.

 
Answer #3       Answered By: Ashley Robbins          Answered On: Dec 22, 2003       

Can you just use stsadm.exe -createsite??

 
Answer #4       Answered By: Kelly Fowler          Answered On: Dec 22, 2003       

I think what he is looking for is the ability to generate sites  when
some other event occurs. We've had lots of clients that want the
creation of an account in a CRM or ERP system cause the creation of a
WSS site  automating this activity. Maybe I'm reading too much into the
question.

Anyway, I think that the C# API code  that Dan posted subsequently is on
the right track.

 
Didn't find what you were looking for? Find more on Automatically Create Sites Or get search suggestion and latest updates.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].