Hello
I have a view as follows that is not working: model is: @model IEnumerable<RoleModel>
@for (int i = 0; i < Model.Count(); i++) {<input type="hidden" name="hdn_@([i].Text)" value="[@i].Text" /> }
the attribute that is set to: name="hdn_@([i].Text)" gives me an error:
Invalid expression term '['
I also get an error in another view that is:
<input type="checkbox" asp-for="@Model.IsApproved" checked=@(Model.IsApproved? 'checked':'') />
for the checked attribute. I used the same syntax @() in previous versions of mvc with no problem why this doesn't work?