Html.EditorForModel doesnt render complex types
I have a class with this property
[Display(Name = "Estado Civil"),UIHint("EstadoCivil"),ScaffoldColumn(true)]
public virtual EstadoCivil EstadoCivil { get; set; }
开发者_开发知识库then in my view I call Html.EditForModel(), however the property doesnt show, I even have the template in my Controller's views folder and then "EditorTemplates", I'm using razor and my view is not strongly typed, would that have something to do?
By default editor/display templates descent only one level in the object hierarchy. Here's an excellent blog post from Brad Wilson which describes how you could have an editor template which descends more than 1 level.
精彩评论