Why is EditorFor in my ASP.NET MVC 2 application throwing ArgumentNullException?
问题 I have a weird problem with EditorFor in one of my views. The following code throws an ArgumentNullException. <%: Html.EditorFor(x => x.Name) %> However, the following code is fine. <%: Html.TextBoxFor(x => x.Name) %> Model.Name is a string variable - and it's set. EditorFor works in another view - until this view crashes, at which point then I have to restart the development web server (Cassini) or all the EditorFor calls crash with the same message. I ran a test with the MVC 2 source,