I am having a hard time understanding why this won't work:
@if ((Model.doaFormGroupDocuments.Count != 0) || (Model.doaFormGroupDocuments != null))
{
@for(var i = 0; i < Model.doaFormGroupDocuments.Count; i++)
{
@Html.HiddenFor(model => model.doaFormGroupDocuments[i].Checked)
@Html.HiddenFor(model => model.doaFormGroupDocuments[i].Id)
@Html.HiddenFor(model => model.doaFormGroupDocuments[i].Name)
}
}
I am getting a red error line under the @ next to the for loop. Is this not allowed in HTML?