0
It’s like, 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++;
}
@Count is not recognized.
I need an alternative to be able to reference @Count without using spaces or characters. Or some little space-clearing script, but I have no idea if that’s possible.
Possible duplicate of Remove space from a name in a form
– hugocsl