simple question: Difficulty in declaring and using variable
- by user281180
What is wrong with the following code: I`m having the error message
Error 1 ; expected
<%if (Model.ReferenceFields != null)
{%>
<%int count = 1; %>
<%foreach (var referenceName in Model.ReferenceFields)
{%>
<%var value = "value"; %>
<%count++; %>
<%value = value + count.ToString(); %>
<tr>
<td><input type="hidden" name="Tests.Index" value='<%value%>' /></td>
<td><input type="text" name="Tests['<%value%>'].Value"/></td>
<td><input type="button" value= "Add" /></td></tr>
<%}
%>
<%}
%>