开发者

Add Multi line text field to sharepoint

开发者 https://www.devze.com 2023-01-17 07:58 出处:网络
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.

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);
0

精彩评论

暂无评论...
验证码 换一张
取 消