I have the jquery autocomplete UI working great but i was wondering if on the list of options i can put more than 1 autocomplete option. To clear this up I have a textbox that looks up location but currently when a user types something in it only shows the cities such as "dallas" instead of "dallas, Tx" how can I get it like this? http://www.trulia.com/ this website has it perfectly. This is my code
public ActionResult autocomplete(string term)
{
var zipps = db.zipss.Where(s => s.city.StartsWith(term)).Take(10).Select(r => new { label = r.city, r.state }).ToList();
return Json(zipps,JsonRequestBehavior.AllowGet);
}
you can add multiple return values like this
you can add as many options as you want here