Get list item by GUID

I am working on sharepoint 2010 and I am new to sharepoint. I want to access the list item as directed. So how can I access. Please provide some link or class file to access this.

Thanks in advance.

+4
source share
1 answer

Use the SPList.GetItemByUniqueId method:

using (SPSite site = new SPSite(url)) { using (SPWeb web = site.OpenWeb()) { SPList list = web.Lists[listTitle]; SPListItem item = list.GetItemByUniqueId(itemGuid); } } 
+2
source

Source: https://habr.com/ru/post/1386298/


All Articles