设置 SharePoint 列表元数据
元数据似乎经常用于描述 SharePoint 列表的结构。 该结构允许在列表item级别存储数据。
如何在不依赖附加列的情况下指定有关列表本身的信息?
理想情况下,我想要类似 SPList.Properties ["Mykey"] = "MyValue"
PropertiesXml 的东西不可设置,但有什么方法可以更改它返回的数据吗?
Metadata seems to be used frequently to describe a SharePoint list's structure. That structure allows the storage of data at the list item level.
How can I specify information about the list itself without relying on an additional column?
Ideally I want something like SPList.Properties ["Mykey"] = "MyValue"
PropertiesXml isn't settable but is there any way to alter the data it returns?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
SPList 对象本身没有属性包,但是您可以使用 SPList.RootFolder。 其 SPFolder 对象具有 Properties 属性。
There is no property bag on the SPList object itself, however you can use the one on SPList.RootFolder. Its SPFolder object has a Properties property.
作为 Alex 直接回答的替代方案,您可以将列表中的元数据存储在单独的专用(可能是隐藏的)列表中。
As an alternative to Alex' direct answer, you could store the metadata on your lists in a separate dedicated, possibly hidden, list.