获取列表项的 guid
我有包含列表名称和项目名称的文本文件。我需要通过名称获取项目指南。如何? (在 splist 中不使用 foreach splistitem 项会导致文本文件很大并且循环会产生影响)
I have text file with List Name and item name. I need to get item guid by it's name. how? (not using foreach splistitem item in splist cause the text file is large and the loop is going to take a toll)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可能有足够的信息来使用 SPWeb 函数 GetListItem,否则您需要尝试 SPWeb.SearchListItems。两者都不会那么快。
网络服务有一个不错的搜索功能,我已经使用过,例如:
You may have enough information to use the SPWeb function GetListItem, otherwise you will need to try SPWeb.SearchListItems. Neither of which is going to be all the fast either.
The web services have a decent search function that I have used such as:
http://msdn.microsoft.com/en-us/library /microsoft.sharepoint.spsitedataquery.aspx 或 CamlQuery
SPListItemCollection items = web.Lists.GetItems(new SPQuery() { Query = "YOUR QUERY" });
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsitedataquery.aspx or CamlQuery
SPListItemCollection items = web.Lists.GetItems(new SPQuery() { Query = "YOUR QUERY" });
进入列表设置页面。右键单击“标题、描述和导航”并复制 URL。将其粘贴到记事本中,然后复制字符串中“List=”后面的所有内容。这是列表的 URL 编码 GUID。您需要做的就是在这里对其进行解码
http://www.albionresearch.com/misc/urlencode.php
来源:
http://weblogs.asp.net/jimjackson/archive/ 2008/02/11/从浏览器获取-a-sharepoint-list-guid-from-the-browser.aspx
这是为了手动获取某个列表的每个 GUID。
Go to the list settings page. Right click on "Title, description and navigation" and copy the URL. Paste that into notepad and copy everything after "List=" in the string. That's your URL Encoded GUID for the list. All you need to do is decode it here
http://www.albionresearch.com/misc/urlencode.php
source:
http://weblogs.asp.net/jimjackson/archive/2008/02/11/get-a-sharepoint-list-guid-from-the-browser.aspx
this is for manually getting each GUID of a certain list.