This question is locked. New answers and comments are not allowed.
Hello
I am new to MVC, and I am trying to use the DropDownList control.
I copy/pasted the example code, like such :
But on the POST, the returned value is a string, though it should be an int, so the ModelState is not valid.
And I have no idea how to return an int, or convert it to int before validating the ModelState, or whatever.
Thanks for your help
I am new to MVC, and I am trying to use the DropDownList control.
I copy/pasted the example code, like such :
ViewData["jeux"] = new SelectList(_entities.jeux.ToList(), "jeu_id", "jeu_nom");<%= Html.Telerik().DropDownList() .Name("jeux") .BindTo((IEnumerable<SelectListItem>)ViewData["jeux"]) %>And I have no idea how to return an int, or convert it to int before validating the ModelState, or whatever.
Thanks for your help