I have a aspx page that looks something like this:
Some label
Some complex control
If the last sorting done by the user is stored as a list containing the row id, you could do this:
loop through list from db {
$("#"+rowId).appendTo("#tableId")
}
This way, the rows will be taken out of their current location and replaced inside the table in the order they are stored in the database.