Posted by stratosg in Sharepoint, Tutorials
on Jan 5th, 2010 | 0 comments
To cut to the chase, the process of creating a new subsite using WSS is as follows:
Connect to the main site using SPSite.
Add the new site using the Add() method on AllWebs collection.
Do all kinds of magic using the newly created site.
Here is a small C# code example:
SPSite rootSite = new SPSite("http://testsite");
SPWeb site = rootSite.AllWebs.Add("testsub");
In order to access this site you need to visit “http://testsite/testsub”. Hope this...
Posted by stratosg in C#, Sharepoint, Tutorials
on Dec 22nd, 2009 | 2 comments
In this small tutorial i shall demonstrate how to hook up C# to use the Windows Sharepoint Services API (WSS). It’s fairly simple and straightforward. You need the following:
A machine running Windows server 2003/08 with Sharepoint installed.
Microsoft Visual Studio 2005.
About 15 minutes.
For the purposes of this example, we will create a small console application that will list all the sites of a Sharepoint site. First of open Visual Studio and create a new Visual C# console application. Next step is adding the reference to the WSS API on our project. To do so, you can go on the explorer...