Skip to content

Instantly share code, notes, and snippets.

@olegwtf
Created January 20, 2015 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olegwtf/f1aa01e5e33f2c49bbc5 to your computer and use it in GitHub Desktop.
Save olegwtf/f1aa01e5e33f2c49bbc5 to your computer and use it in GitHub Desktop.
sharepoint: get folder items
CamlQuery camlQuery = new CamlQuery();
camlQuery.FolderServerRelativeUrl = cFolder.ServerRelativeUrl;
List list = ctx.Web.Lists.GetById(listGuid);
ctx.Load(list);
ctx.ExecuteQuery();
var items = list.GetItems(camlQuery);
ctx.Load(items);
ctx.ExecuteQuery();
foreach (ListItem i in items)
{
ctx.Load(i);
ctx.ExecuteQuery();
Console.WriteLine("{0} - {1}", i["Title"], i["_x0418__x0442__x0435__x0440__x04"]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment