问题
I am working on an updates page where the user can input updates into the system and all the updates are shown in a repeater control on the same page.
As they are now, the latest update is displayed on the bottom of the page whilst the first update is displayed on top.
Is there a way to reverse the order such that the latest updates in the repeater are always displayed on top? Thanks :)
回答1:
Just change the query which finds "all the updates" so that it returns the results in the descending order. You haven't told us anything about where that data's coming from, but I can't imagine it would be hard to reverse the order. The repeater doesn't need to know about it.
来源:https://stackoverflow.com/questions/9954797/c-sharp-reverse-repeater-order