Tag WebCollection

Sites and Sub-sites

By SharePoint object model, how we can get all the sites with sub sites and the top-level sites alone separately. The following snippet which returns all the sites and sub-sites from the site collection. SPSite site=new SPSite.AllWebs; and if we…