public JsonResult GetCity(string acctcity, int iState = 0) { //clsSubmitModel oSubmit = new clsSubmitModel(); DataTable dt; dt = oSubmit.GetCity(acctcity, iState); var result = new List <KeyValuePair <string, string> >(); foreach (DataRow dr in dt.Rows) { result.Add(new KeyValuePair <string, string>(dr["citycode"].ToString(), dr["cityname"].ToString())); } var result3 = result.Where(s => s.Value.ToLower().Contains(acctcity.ToLower())).Select(w => w).ToList(); return(Json(result3, JsonRequestBehavior.AllowGet)); }