Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在研究 sharepoint-2010,我是 sharepoint 的新手。我想按 Guid 访问列表项。那么,我该如何访问。请提供一些参考或一些类文件来访问它。
提前致谢。
使用SPList.GetItemByUniqueId方法:
using (SPSite site = new SPSite(url)) { using (SPWeb web = site.OpenWeb()) { SPList list = web.Lists[listTitle]; SPListItem item = list.GetItemByUniqueId(itemGuid); } }