I am using C#, MVC 3 with razor The list is null in post when using the surounded if-statement. It works fine without the if. What I need is the list to have all the values in from the textboxes.
for (var i = 0; i < Model.Budget.BudgetRader.Count; i++)
{
if (Model.Budget.BudgetRader[i].Konto != -1) {
<tr>
<td>@Html.TextBoxFor(x => x.Budget.BudgetRader[i].BudgetBelopp)</td>
</tr>
}
}