I have tabular data that I would like to be sorted by clicking on column headers. I understand I can do this by passing the column to sort on to the server in the query string, and then returning the data back to the client to be displayed in the table. However, I would like to be able to switch between ascending and descending sorts if the user clicks on the same field twice.
I have considered using ASP.NET's session to remember the last field that was sorted on, but I am wondering if there is a more REST-ful approach?
I am using JQuery on the client and ASP.NET on the server.