I am trying to add a multi-line text field to 开发者_StackOverflowa document within Sharepoint but can't currently figure out how to do it. Below is the code i have which works for most of the fields.
SPFile file = folder.Files.Add(*snip*);
file.Item[guid] = stringValue;
file.Item.SystemUpdate(true);
The document adds with no issues the problem is just adding multi line meta data to the file.
Multi-line fields (such as Keywords) simply expect a carriage return + new line pair to separate out each line:
SPFile file = folder.Files.Add(*snip*);
file.Item["Keywords"] = String.Format("One{0}Two{0}Three", Environment.NewLine);
file.Item.SystemUpdate(true);
精彩评论