I pass from the controller an array generated by the following code:
public ActionResult GetClasses(bool ajax, string kingdom)
{
int _kingdom = _taxon.getKingdom(kingdom);
var query = (from c in vwAnimalsTaxon.All()
orderby c.ClaName
select new { taxRecID = c.ClaRecID, taxName = c.ClaName }).Distinct();
return Json(query, JsonRequestBehavior.AllowGet);
}
A list of queries should be ordered, but it doesnβt work, I get the names of classes that are ordered incorrectly in the array, because I saw how it debugs that the names are not ordered. The view is just a dropdownbox loading automatically, so I'm pretty sure the problem is with the action. Do you see something wrong? Did I miss something?
source
share