Tuesday, March 30, 2010

SPWebCollection

SPWebCollection lets you to enumerate the Websites in the Share point server.


SPSite site = new SPSite("http://win-zmmypcbnz7k/");


SPWebCollection collection = site.AllWebs;
foreach (SPWeb web in collection)
{
Response.Write(web.Author.ToString());
}