A Practical Guide to SharePoint 2013

A Practical Guide to SharePoint 2013
A Practical Guide to SharePoint 2013 - Book by Saifullah Shafiq

Saturday, December 3, 2005

How can we create a site in portal server?

How can we create a site in Portal Server?

SPWeb mySite = SPControl.GetContextWeb(Context);
SPWebCollection subSites = mySite.Webs;
string currentTemplate = mySite.WebTemplate;
string siteUrl = TextBox1.Text.ToString(); //you can use hard coded path
here
string siteTitle = TextBox2.Text.ToString(); //you can use hard coded title
for testing purposes
string siteDescription = TextBox3.Text.ToString(); //use hard coded
description for testing
subSites.Add(siteUrl, siteTitle, siteDescription, 1033, currentTemplate,
true, false);