Friday, 8 November 2013

Programmatically get all site collection Name in share point using C#

Share it Please
   SPWebApplication webApp = SPWebApplication.Lookup(new Uri(WebApp));
            foreach (SPSite site in webApp.Sites)
            {
                SPWeb thisweb = site.OpenWeb();
                string WebName = site.Url;
                string templateName = thisweb.WebTemplate;
                site.Dispose();
            }

No comments:

Post a Comment

Followers

Follow The Author