ASP.NET-MVC EditorTemplates
Questions tagged [mvc-editor-templates]
379 questions
45
votes
2 answers
ASP.NET MVC 4 Editor Template for basic types
I've created a template for Number input and if I do
@Html.EditorFor(model => model.SomeValue, "Number")
it works fine and the template is used.
However that doesn't work:
@Html.EditorFor(model => model.SomeValue)
Why do I need to specify the name…

Sam
- 13,934
- 26
- 108
- 194
39
votes
3 answers
How to use EditorFor inside a foreach
I have a model:
public class MyListModel
{
public int ID {get;set;}
public List Users{get;set;}
}
How do I use the Html.EditorFor method inside a foreach?
@model MyListModel