public ActionResult GetStateListByCountryId(int countryId) { var data = _StateWebTask.GetStateListByCountryId(countryId); var result = (from s in data select new { StateId = s.StateId, StateName = s.StateName }).ToList(); return(Json(result, JsonRequestBehavior.AllowGet)); }