Store the pagination number in the query string, session or as a user setting of some kind and then use that to define how many results are returned per page
I would do the former as it's slightly more intuitive
Return another set of html with the updated list, or have the JS on the client ask for an updated list if the delete is successful.
Provide two parameters to model
1.Starting Item 2.Number of items to show
And in query start from STARTING ITEM and limit to NUMBER OF ITEMS These way is also good when user change number of items to show.For example lets say user is listing 10 items and he is at page 2 (items 11-21), he change number of items to show to 15.So now good thing is that you already know he already seen first 10 items and you will start list from item 11 to 26.These way you wont repeat items he already seen.
You won't need to do this if it's a toy project or small one, though. It has its own learning curve.
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us