I have a IList
as a property named Tags
in my model. How do I name the files for display and editor templates to respect it when I call
I had the same problem today. Hope this helps:
forach(var tag in Tags) {
<%= Html.EditorFor( _ -> tag) %>
}
If you absolutely want to do sth. like
Html.EditorFor(mymodel=>mymodel.Tags)
Then you will have to:
Create a UserControl (TagList.ascx) and add an UIHint attribute to MyModel
class MyModel {
[UIHint("Taglist")]
IList Tags {get; protected set;}
}