I have a problem when trying to use multiple FOR loop (for in for). The error message is:
Parser Error Message: The for block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup.
Here is my code, the problem come from the first for :( .
<table width="100%" border="1">
@for (int q = 0; q < quanList.Count; q++) {
<tr>
<td>@quanList[q]</td>
@for (int s = 0; s < sizeList.Count; s++) {
<td><input type="text" name="txtval" style="width:80px" /></td>
}
</tr>
}
</table>
Thank you very much for any suggestion and ideas.
I want to show a table with dynamic rows and columns, two list has been created from controller and parse to view via ViewBag:
@{
List<string> sizeList = (List<string>)ViewBag.SizeList;
List<string> quanList = (List<string>)ViewBag.QuanList;
}
name="txtval_@q_@s"part? Maybe those@characters are causing an issue.