I am confused between SPSite
, SiteCollection
, and SPWeb
?
So my understanding is this pseudo code:
http://My_server >>> TOP Level SIte or SPWEbApplication
http://My_server/My_site >>>> Site Collection or SPSite
Now a site under SPSite
that will be referenced through SPWeb
. So what are we getting when using SPWeb.Webs
?
What is a Subsite?
Test code:
SPWeb mySite = SPContext.Current.Web;
SPWebCollection sites = mySite.Webs;
foreach (SPWeb subSite in sites)
{
Response.Write(SPEncode.HtmlEncode(subSite.Title) + "<BR>");
}