Randomized data-based List/Grid

I want to build a List which is based on a dataset, that always shows 5 items at a time, but randomized. Every time the page refreshes, 5 other items should be shown. How can I do this?

Hello

to do that i suggest the following:

  • add your list (example: repeater)

  • query your database and get all the items into an array

  • push five of the array items into an array of object in the repeater data format.

  • set repeater’s data and items (for example title element)to it.
    useful articles:

  • data query

  • repeater data

Massa