I have written this code using SharePoint.Client.dll
Basically I have a list with more than 20K items (spread accross folders) and I am reading items only from a specific folder using pagination.
Unfortunately... my customer wants the same functionality by a call to Lists.asmx.
When I generate the proxy to Lists.asmx. I don't see anyplace for me to
1. Specify the folder
2. perform pagination.
Can someone show me how to set the folder (like I do on the query object below) and also to perform pagination on results by using Lists.asmx?
string url = "http://bi.abhi.com";
ClientContext c = new ClientContext(url);
List list = c.Web.Lists.GetByTitle("LargeList");
if (list == null)
{
Console.WriteLine("List is null");
}
else
{
CamlQuery query = new CamlQuery();
query.ViewXml = "<View><RowLimit Pages='true'>100</RowLimit><Query></Query></View>";
query.FolderServerRelativeUrl = "/Lists/LargeList/folder20";
do
{
ListItemCollection listItems = list.GetItems(query);
c.Load(listItems);
c.ExecuteQuery();
Console.WriteLine(listItems.Count);
foreach (ListItem i in listItems)
{
Console.WriteLine(i["Title"]);
}
query.ListItemCollectionPosition = listItems.ListItemCollectionPosition;
} while (query.ListItemCollectionPosition != null);
}val it: unit=()