public ActionResult GetTowns(int Id) { List <Town> towns = _townService.GetIdList(Id); List <SelectListItem> list = (from i in towns select new SelectListItem { Value = i.Id.ToString(), Text = i.TownName, }).ToList(); return(Json(list)); }