Posts by André Nakamura • 1 point
1 post
-
0
votes1
answer104
viewsQ: How to use C# syntax in onclick
I declared a variable in view: @{ int index = 0; } And I want to change it through a onclick: @for (var b = 0; b < cont; b++) { <li> <a onclick="@(Index = b)">Endereço @(b +…