I am using a Repeater control to display data from a SQL server on multiple different sites right now. I am wondering if there is any way to make a repeater only "repeat" or run through its cycles a maximum of N times.
I split a Div element up into 4 equal sections which have just enough room for 4 cycles of this repeater. If it runs more than 4 times, it pushes everything down in the div and begins a new row of images/text I would prefer to avoid. It makes the web page look uglier and does not really accomplish much for the client.
Also is there any way to randomly select which iterations through the repeater get displayed? For example, one time the page loads, the repeater pulls iterations 2-5, then you refresh the page and the repeater pulls iterations 1-4. That would be very cool if I could make the images/text that show up to be random.
For those that are curious, a repeater is an ASP.net object which basically iteratively displays or otherwise works with data from a table, SQL database, etc. It just goes row by row through whatever the data is.