Model Binding to Enums in ASP.NET MVC 3
问题 I have a method in my controller that accepts an object as an argument and returns a JsonResult. One of the properties on this object is an enum with three possible values. I assumed that when the client passed in an int for that property it would populate the enum, but it doesn\'t, it defaults to 0 and the enum is set to the first of it\'s possible selections. Any suggestions? 回答1: NOTE: This has been resolved in MVC 4. If upgrading to MVC 4 is a viable option for your project then that is