I have this code (nested inside a form post) but am continually getting the error that it\'s missing the closing }
@for(int i=0;i< itemsCount
Easiest way is to make use of HTML Helpers. Code will be clean as well (your name format for Description and UnitPrice seems to follow the same format; you may want to change it)
@for (int i = 0; i < itemsCount; i++)
{
@Html.Hidden(string.Concat("ïtem_name_", i), items[i].Description)
@Html.Hidden(string.Concat("ïtem_name_", i), items[i].UnitPrice.ToString("c"))
}