Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We have a asp.net listview displaying news item on a page and it has paging functionality to load the next set of news which works fine.

A requirement now is to implement more modern Read more functionality. By default the 10 latest news items are displayed (publishing pages). At the bottom of the listview there should be, instead of paging, a Read more link. This link should keep the 10 latest news plus display 10 more. There are clunky ways of doing this with repeater, updatepanel etc. but what is the best way these days, jQuery and WCF?

I'm not looking at something where we load 10 items by default, click Read more and reload everything but use .Take(20), second time we click reload everything again with .Take(30) etc...

Any ideas?

Thanks in advance.

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

I'd recommend that you do all of the formatting on the client and use the SharePoint REST api to get the data, then on ReadMore you can do $skip=x*10&$take=10.

To get started on the REST api see Using the REST Interface

share|improve this answer
    
thanks for the link –  John Oct 2 '12 at 2:03
add comment

For this, you can try to combine both jQuery and RespAPI or SharePoint ecmaScript to achive this.

Ex:) Using SharePoint ecmaScript get the latest items and show them in an element. If the user clicks the Read More link, call the same script method to append the items below the same element.

share|improve this answer
add comment

Your Answer

 
discard

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.