I\'m trying to set id and name for @Html.EditorFor, but this isn\'t working:
@H
EditorFor does not allow for adding htmlAttributes. For the specific types of editors you'll have to use TextBoxFor (or whatever type you're using).
@Html.TextBoxFor(m => m.value, new { id = "testid1", name="Testname1" })
You can also create a custom editor template for the particular type you're creating an editor for.