Since it is necessary to create an item of the event type and assign a value to each of them, it is not right to assign a value directly to the previous experience when writing to the workspace type of column, so I think how to assign a value.
In general, I've been given the idea of assigning values to each column in SharePoint as follows:
1. First know the type of the current column, with single line of text for example, so that the regular type of column can be directly assigned a string
2. With the Lookup Type column example, we can get his value type is spfieldlookupvalue, then according to this class request, we can assign the value:
Spfieldlookupvalue value = new Spfieldlookupvalue (item.id,item.id. ToString ());
item["Lookup"]=value;
3. With the current Workspace type column also follows the above to assign value, it is wrong to get workspace type column type is Spfieldcrossprojectlink, does not get his value type, From the interface operation to see this workspace is associated with a workspace type of web, so the idea was as follows:
A. First create a workspace type of Web, and then let this column value and this Web association on
B. How to relate, want to follow the steps to get it, but it is not successful
C. Conversion ideas, then by the workspace type of Web to associate this column, really useful
Reference: Http://www.c-sharpcorner.com/Blogs/9419/programmatically-link-the-meeting-workspace-website-to-the-c.aspx
How to assign a value to workspace column in the event Content type in the SharePoint calendar type list