public JsonResult GetCities() { try { CommonModel model = new CommonModel(); List <CommonModel> cityList = model.GetCityData(); var jsonData = new { rows = (from data in cityList select new { id = data.CityID, city = data.CityName.ToString() }).ToList() }; return(Json(jsonData, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { UtilityController.LogException(ex, MethodBase.GetCurrentMethod().ReflectedType.Name, MethodBase.GetCurrentMethod().Name); } return(null); }