The ViewData item that has the key 'MaritalStatus' is of type 'System.String' but must be of type 'IEnumerable<SelectListItem>' [duplicate]
问题 This question already has answers here : The ViewData item that has the key 'XXX' is of type 'System.Int32' but must be of type 'IEnumerable<SelectListItem>' (6 answers) Closed 3 years ago . I am populating DropDownList from in-memory data and getting this error on POST. Error: The ViewData item that has the key 'MaritalStatus' is of type 'System.String' but must be of type 'IEnumerable'. Controller:- // GET: /Application/Create public ActionResult Create() { List<SelectListItem> lst = new