public ActionResult GetCity(int State) { ValueController ob1 = new ValueController(); DataSet ds = ob1.GetCity(State); List <City> citylist = new List <City>(); foreach (DataRow dr in ds.Tables[0].Rows) { citylist.Add(new City { CityName = dr["CityName"].ToString(), CityId = Convert.ToInt32(dr["CityId"]) }); } return(Json(citylist, JsonRequestBehavior.AllowGet)); }