October 2010
Intermediate to advanced
1920 pages
73h 55m
English
You can sort the items in a ListView control by adding one or more button controls to ListView that have a CommandName property set to the value Sort and a CommandArgument property set to the name of a property to sort by. For example, the page in Listing 14.5 contains a ListView control that renders an HTML table. You can click the column headers to sort the table by a particular column (see Figure 14.5).
Figure 14.5. Sorting data with the ListView control.

Listing 14.5. SortListView.aspx

The two LinkButtons used for ...