mercredi 4 février 2015

how to get spsite title only



Right now my code gets the URL from my SPSite but I only want to get the Title



var url = portalUrl.Text;
if (SPSite.Exists(new Uri(url)))
{
using (SPSite oSiteCollection = new SPSite(url))
{

SPSiteCollection collWebsite = oSiteCollection.WebApplication.Sites;


foreach (SPSite site in collWebsite)
{
listboxLogging.Items.Add(SPEncode.HtmlEncode(site + Environment.NewLine));
}


}
}







0 commentaires:

Enregistrer un commentaire