Monday, 30 September 2013

Programmatically get all web application Name in share point using C#

            get all webapplicationName      
            string strurls = "";
            SPWebApplicationCollection webapps = SPWebService.ContentService.WebApplications;
            foreach (SPWebApplication webapp in webapps)
            {
                string WebName = webapp.DisplayName;
                foreach (SPAlternateUrl url in webapp.AlternateUrls)
                {
                  strurls = url.Uri + "";
                }
             }

No comments:

Post a Comment