Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I would like to display folders and sub documents in share point document library using object model.

can anyone help.

Thanks in advance.
Regards,
Hari.
Posted

1 solution

you can do like:

ClientContext clientContext =
new ClientContext("http://Servername/");
List sharedDocumentsList = clientContext.Web.Lists.GetByTitle("Shared Documents");
CamlQuery camlQuery = new CamlQuery();
camlQuery.ViewXml =
@"<view scope="Recursive">";

ClientOM.ListItemCollection listItems =
sharedDocumentsList.GetItems(camlQuery);
clientContext.Load(listItems);
clientContext.ExecuteQuery();
foreach (var item in listItems)
{
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900