Answer the question
In order to leave comments, you need to log in
What should be the model for this view?
View with identical inputs:
@using (Html.BeginForm(" ", "Home", FormMethod.Post))
}
@Html.EditorFor(model => model.Field)
@Html.EditorFor(model => model.Field)
@Html.EditorFor(model => model.Field)
<input type="submit" value="save">
}
Answer the question
In order to leave comments, you need to log in
I solved the issue, it's just that EditorFor cannot define an array of data in the model, you have to use TextBoxFor and catch them in the controller as an array of data.
Make a HiddenFor for the data array, and in JS form this array and write it to the hidden field.
Or do you have each field has its own purpose, and not just an array of values?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question