public static void GetAllListItemsInFolder()
{
ClientContext clientContext = new ClientContext("http://xxxxxx:000");
List list = clientContext.Web.Lists.GetByTitle("MainLib");
CamlQuery camlQuery = new CamlQuery();
camlQuery.ViewXml = @"
"; camlQuery.FolderServerRelativeUrl = "/MainLib/HR";
ListItemCollection listItems = list.GetItems(camlQuery);
clientContext.Load(listItems);
clientContext.ExecuteQuery();
ListItem itemOfInterest = listItems[0];
string Itemcreator = itemOfInterest.FieldValues["Created_x0020_By"].ToString();
string Itemtitle = itemOfInterest.FieldValues["Title"].ToString();
}
Retrieve files from a sub folder SharePoint document library with CSOM
Saturday, June 1, 2013
Posted by Usama Wahab Khan at 9:44 AM
Labels: SharePoint 2010, SharePoint 2013
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment