System.MissingMethodException: No parameterless constructor defined for this object

前端 未结 2 1518
攒了一身酷
攒了一身酷 2021-01-25 22:52

I\'m using MVC 2.0 with a Html.ListBoxFor as below:

<% using (Html.BeginForm()) { %>

       \" />

        <%=         


        
2条回答
  •  执笔经年
    2021-01-25 23:37

    Does your LogOnModel have a parameterless constructor? It needs one for the DefaultModelBinder to instantiate it. Additionally, when you post the exception, please post the full stack trace from the exception object, else we're simply guessing where the error actually took place.

提交回复
热议问题