SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The CAML query to pull say 3 items based off of the following requirements seems pretty starightforward:

  1. Title is not null

  2. Expires(Expiry Date) is greater than or equal to Today

  3. Order Created in Ascending

  4. spQuery.RowLimit =3;

However how do I modify the Query to obtain the next three in the list preserving all my previous filters and order bys?? Thanks

enter image description here

share|improve this question
up vote 5 down vote accepted

To achieve this, You can use ListItemCollectionPosition property. It is used together with the RowLimit property to define paging in a query.

For your reference, see the sample code available this link

I hope this will resolve your problem.

share|improve this answer

Paging in SPQuery is implemented through the class SPListItemCollectionPosition. The SPListItemCollection returned by SPQuery.GetItems contains a ListItemCollectionPosition property which is null if no more pages and otherwise can be used assigned to the corresponding property in SPQuery before a new call to GetItems. (Sample at the link above)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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