Reputation: 147
how to set a repeater that will order by Name A-Z?
Upvotes: 0
Views: 3108
Reputation: 44906
The repeater will simply enumerate the datasource assigned to it. If you want to order the display of the repeater you need to order the underyling datasource.
var orderedByNameList = People.OrderBy(p => p.Name);
rptPeople.DataSource = orderedByNameList;
rptPeople.DataBind();
Upvotes: 4