Sharepoint Answers

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds
  Question Asked By: Virgil Herring   on Dec 03, 2009 In Sharepoint Category.

 
Question Answered By: Bhavi Chauhan   on Dec 03, 2009

Is this an SPS Area or a WSS site? If it's an Area, then here's an example:

TopologyManager topologyManager = new TopologyManager();
Uri uri = new Uri("http://MyPortal");
PortalSiteCollection sites = topologyManager.PortalSites;
PortalContext portalContext = PortalApplication.GetContext(sites[uri]);
Guid homeGuid = AreaManager.GetSystemAreaGuid(portalContext, SystemArea.Home);
Area homeArea = AreaManager.GetArea(portalContext, homeGuid);
string emailAddress = homeArea.OwnerEmail;

If this is a WSS site:

SPWeb mySite = SPControl.GetContextWeb(Context);
string emailAddress = mySite.Author.Email;

Tagged:            

 
 
Didn't find what you were looking for? Find more on Enable to get the contact informations Or get search suggestion and latest updates.