Programmatically getting the Site Collection Name
Just was sorting out a quick console app that audited all the details of a MOSS 2007 farm, all Web Applications, down through Site Collections, Sites, Webs and down to list level. When presenting this to the end user, I wanted to use a cascading drop down, where the user selected the Web Application and then had a nice list of Site Collections to choose from.
The problem I hit was how on earth to get the Site Collection Title and Description. These are displayed in Central Administration | Application Management | Site Collection List but are not included in the SPSiteCollection object, nor the WebApplication object (which holds stuff like the Content Database which is included on that page).
Answer: the Title and Description that appears on the Site Collection List page is the Title and Description of the root Site in the Site Collection.
Try it! Check the Title and Description in Central Admin, then change them on the root Site using Site Settings | Title, Description and Icon.
Took me a while to find that one…