// We want to create the site using a pre-defined site template.
// People refer to site templates by using the public template name,
// but SharePoint refers to them by using the internal template name.
// Find the internal name for the desired site template.
string InternalTemplateName = "";
SPWebTemplateCollection webTemplates = globalAdmin.VirtualServers[0].GetWebTemplates(localid);
foreach(SPWebTemplate t in webTemplates)
{
if(t.Title.CompareTo(strPublicTemplateName) == 0)
{
InternalTemplateName = t.Name; break;
}
}
// If the template could not be found...
if( InternalTemplateName == "" )
throw new Exception( "Cannot find site template '" + strPublicTemplateName + "'." );
// Create WSS project site.
SPSite newSite = siteCollections.Add( url, title, desc, localid, InternalTemplateName, login, name, email );
Now if I can just get them all to learn binary...







