Main View Code:

@model List<ViewModel> @using (Html.BeginForm()) { @Html.Action("_partial") <input type="submit" value="Отправить" /> } 

Partial code:

 @model List<ViewModel> @foreach (ViewModel item in Model) { <div> @Html.EditorFor(m => item.Name) @Html.HiddenFor(m => item.Id) </div> } 

When submitting the model to the controller is not sent. What could be the problem?

    1 answer 1

    try passing the model to a partial view @ Html.RenderPartial ("_ partial", Model)

    • I have a partial view with my logic, that's why @ Html.Action () is used - Sergey Tambovtsev