1

I want to retrieve only the documents that are present inside a specific folder of a document library using GetListItemsAsync method.

Here is how i call it:

sc.GetListItemsAsync("MyDocLib", null, null, null, null, 
    XElement.Parse(@"<QueryOptions><Folder>MyFolder</Folder></QueryOptions>"),
    null);

The call is returning all the documents inside "MyDocLib" and not only those that are in "MyFolder".

How can I do that?

0

You can try this

sc.GetListItemsAsync("MyDocLib", null, null, null, null, 
    XElement.Parse(@"<QueryOptions><Folder>MyDocLib/MyFolder</Folder></QueryOptions>"),
    null);

Notice the document library name before the folder name.

Hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.