Below is the code to read items from a specific folder in SharePoint list
SPList lst = web.GetList("/Lists/ListName");
SPFolder folder = lst.RootFolder.SubFolders["FolderName"];
SPQuery query = new SPQuery();
query.Folder = folder;
SPListItemCollection itemColl = lst.GetItems(query);
SPList lst = web.GetList("/Lists/ListName");
SPFolder folder = lst.RootFolder.SubFolders["FolderName"];
SPQuery query = new SPQuery();
query.Folder = folder;
SPListItemCollection itemColl = lst.GetItems(query);
No comments:
Post a Comment