I was wondering how people were going about sorting a table in asp.net mvc? I\'ve heard of javascript solutions that work pretty well with non-paged tables, such as jquery\'s ta
If JavaScript is disabled, you have a problem.
I'd go for a noscript solution.
I'd have two radio button groups:
direction: ( ) ascending (.) descending
orderBy: (.) Id ( ) Name ( ) Status
I'd treat the View as a form with multiple submit buttons:
(without JavaScript) ~~ same name for both buttons.
on your .aspx page, add three buttons:
in your Controller:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Sort(string direction, string orderBy, string submitButton)
{
if (submitButton == "Requery") //et cetera
TMTOWTDI: There's More Than One Way To Do It