【问题标题】:Add Multi line text field to sharepoint将多行文本字段添加到共享点
【发布时间】:2010-09-22 14:54:31
【问题描述】:

我正在尝试向 Sharepoint 中的文档添加多行文本字段,但目前无法弄清楚如何操作。下面是我拥有的适用于大多数领域的代码。

SPFile file = folder.Files.Add(*snip*);
    file.Item[guid] = stringValue;
    file.Item.SystemUpdate(true);

文档添加没有问题,问题只是向文件添加多行元数据。

【问题讨论】:

    标签: sharepoint text metadata field


    【解决方案1】:

    多行字段(例如关键字)只需要一个回车 + 新行对来分隔每一行:

    SPFile file = folder.Files.Add(*snip*);
    file.Item["Keywords"] = String.Format("One{0}Two{0}Three", Environment.NewLine);
    file.Item.SystemUpdate(true);
    

    【讨论】:

    • 看来我的想法有点复杂。应该意识到我自己正在尝试向它传递数组和各种东西。谢谢。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-05
    • 2016-01-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多