How to pass a value to razor variable from javascript variable, is it possible asp.net mvc razor view engine?
@{ int a = 0; }
But it would be possible if one were used in place of the variable in @html.Hidden field. As in this example.
@Html.Hidden("myVar", 0);
set the field per script:
I hope I can at least offer no small Workaround.