public JsonResult GetTrackTitles(string query) { TrackSearchResult tsResult = new TrackSearchResult(); List <TrackSearchResult> suggestions = tsResult.GetTrackSearchResults(query, 20); string[] titles = new string[suggestions.Count]; for (var i = 0; i < suggestions.Count; i++) { titles[i] = suggestions.ElementAt(i).TrackTitle; } return(Json(titles, JsonRequestBehavior.AllowGet)); }
public ActionResult Index(string query) { TrackSearchResult tsResult = new TrackSearchResult(); return(View(tsResult.GetTrackSearchResults(query, 500))); }