C# .NET Wrapper. Can't itterate past 1000 Results in PagedCollection

I have a collection of approx 5000 subscribers on here.  When trying to use API to capture customers with C# wrapper provided here, I can not seem to change the page of the PagedCollection.  I itterate through the first. try to increase the page number by setting PagedCollection.PageNumber +1, and when trying to itterate through results again, Im gettings same results. but when i query the current page number, it is going up as expected... stumped.

for (int i = 0; i < _active.NumberOfPages; i++)
            {
                _active.PageNumber = i + 1;
                
                for (int r = 0; r < _active.RecordsOnThisPage; r++)
                {
                   string name = _active.Results[r].Name;
                }
            }

In this case, everytime i "reach a new page", the name would always be the same for the first itteration of records on each page., the second itteration name would be the same as the second on the last page,

The PagedCollection.RecordsOnThisPage is always 1000. Even if I have 5050 records, once I get to the page that has the remaining 50 subscribers, it RecordsOnThisPage reads 1000.

Any help would be appreciated to actually get the object to page.  Otherwise I am very satisfied with this service, love the mobile templates, SO FAR is integrating with my works POS.

Ken Ken, 3 years ago

Hi there,

You'll need to hit the API again to get the subsequent pages. You've obviously hit the API once, probably getting the 1st page (you would have used a '1' for the 'page' parameter).

A good example of how to get all the Active Subscribers is in the List.cs file in the Samples project in the wrapper solution. It might be worth you just copying+pasting that code directly.

I hope that helps! Feel free to get back to us if you have any other problems or questions.


http://www.campaignmonitor.com

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098