// Get demanded seats accordin to the selected course public ActionResult GetDemandedSeats(string val) { string[] temp = val.Split(','); var demandedSeats = db.BI_pop_demandedseats(Convert.ToInt16(temp[0]), Convert.ToInt16(temp[1])).ToList(); JavaScriptSerializer javaScriptSerializer = new JavaScriptSerializer(); string result = javaScriptSerializer.Serialize(demandedSeats); return(Json(result, JsonRequestBehavior.AllowGet)); }