It's the following, I'm doing a foreach this way.
int count = 1;
@foreach (var item in Model)
{
<input name="itemId_@count" value="@item.ProdutoId" type="hidden">
count++;
}
The problem is that in processing the underline is processed together, and I needed it not to be processed, if I do it this way.
@foreach (var item in Model)
{
<input name="itemId@count" value="@item.ProdutoId" type="hidden">
count++;
}
The @count is not recognized.
I need an alternative to reference @count without having to use spaces or characters. Or some small script that clears space, but I have no idea if that's possible.