SPMeeting.IsMeetingWorkspaceWeb method

Determines whether the specified Web site was created by using a Meeting Workspace template.

Namespace:  Microsoft.SharePoint.Meetings
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public static bool IsMeetingWorkspaceWeb(
	SPWeb web


Type: Microsoft.SharePoint.SPWeb

An object that represents the Web site in question.

Return value

Type: System.Boolean
true if the specified Web site was created by using a Meeting Workspace template; otherwise false.

You can use the static method IsMeetingWorkspaceWeb to determine whether a specified Web site is defined as a Meeting Workspace site. For example, you might iterate through a collection of Web sites and call IsMeetingWorkspaceWeb against each site in the collection before deciding whether to perform some operation on the site.

The following example is a console application that iterates through a collection of Web sites and determines which ones are Meeting Workspace sites. The application then prints the URL and the number of meetings associated with each workspace that it finds.

using System;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Meetings;

namespace Test
   class ConsoleApp
      static void Main(string[] args)
         using (SPSite siteCollection = new SPSite("http://localhost"))
            using (SPWeb rootWeb = siteCollection.RootWeb)
               foreach (SPWeb web in rootWeb.Webs)
                  if (SPMeeting.IsMeetingWorkspaceWeb(web))
                     // Get the meeting count.
                     int count = SPMeeting.GetMeetingInformation(web).MeetingCount;
                     // Print the workspace URL.
                     // If it is a recurring meeting, say so. Otherwise, print the number of meetings.
                     Console.WriteLine("MeetingCount: {0}", 
                        (count == SPMeeting.MeetingCountRecurring) ? "recurring" : count.ToString());
         Console.Write("\nPress ENTER to continue...");