This project is read-only.

MVC_Music_Store Tutorial page 53, Html.EditorFor(...)

Aug 3, 2010 at 1:54 PM
Hi, I'm little confused now :-)... I use VS 2008. I go through the tutorial step by step... Now I have a problem: There is a method for generate some html code depending on the object. Ok.. Html.EditorFor(m => m.Album,...) generates some html code for Album type. By reflection (if there is no EditorTemplate code ...) or using EditorTemplates Album.ascx. The question is here -> ... in Html.EditorFor method. Why signature of my method Html.EditorFor doesn;t have the second parameter object for the anonymous type new {Artists = .. , Genres = ...}? There are two other overloaded methods, that takes a string as parameters... Whats wrong? Best regards, Karol Bladek
Aug 3, 2010 at 8:50 PM
Now it's fine. I was working on the RC version of ASP.NET MVC 2.0. There is only 3 overloades method for Html.EditorFor. Now I'm working with RTM version and it works great.
Aug 3, 2010 at 8:54 PM

Great - yes, that overload was added in the final release of ASP.NET MVC 2, it wasn't there in the RC or previous releases. I wrote about this in more detail on my blog here: