How to go about adding one arrow image (up or down) to a list view’s header so that when you click on it it sorts the column by ascending/descending order?
Currently I just have a link that does the sorting:
<asp:LinkButton runat="server" ID="sortPosition" CommandName="Sort" CommandArgument="Position" >Position</asp:LinkButton>
There are many ways to do it. One is to do it on client side using jquery. You could add a span or div or image and toggle it with jquery depending on the sorting state.
Another way to do it on the server side. You could add control and change ImageUrl property depending on the sort state on Command Sort
Code behind
You would add this image to the layout template of the listview