You can add pages to meeting workspaces through the User Interface (browser) and then you get the options to manage them. It is also possible to add pages through code, but there’s one catch you need to be aware of and that is the InstanceId of the meeting. This ID is used in meeting workspaces to distinguish content per instance of a recurring event. So each meeting instance has its own set of documents and list items througout each List or Library on the site.
Consider the following code:
string url = "http://moss/meeting1";
string newPageUrl = String.Empty;
using (SPSite site = new SPSite(url))
{
using (SPWeb web = site.OpenWeb())
{
SPMeeting meeting = SPMeeting.GetMeetingInformation(web);
meeting.AddPage(String.Format("Page {0}", DateTime.Now.ToString("HHmmss")), meeting.InstanceId, out newPageUrl);
}
}
By adding the page using the InstanceId of the current meeting workspace it will be added to a folder named after the InstanceId in the Pages library. This has the following effects (also applies to items in the other lists and libraries on the meeting workspace):
- the page cannot be managed through the UI (sorting, removal, etc)
- the page is visible only in a single meeting instance in case of recurring events
If you want to add a page regardless of instance you can provide a zero (0) to the instanceId parameter of the AddPage method and it will behave identical to pages added through UI.