Sorry for the really nooby question, but this is tripping me up hard.

I have a controller Inspection, with method Configure which passes a model containing 3 lists. enter image description here

I know that I'm supposed to use HiddenFor to retain the information, but I don't know how to do this with lists.

enter image description here

I have these HiddenFor fields but they don't seem to work in retaining the information

@Html.HiddenFor(model => Model.inspection)
@Html.HiddenFor(model => Model.assignedParts)

for (int i = 0; i < Model.ConfigList.Count; i++)
{
    @Html.HiddenFor(model => Model.ConfigList[i])
}

Related posts

Recent Viewed