How to pass a value to razor variable from javascript variable, is it possible asp.net mvc razor view engine?
@{ int a = 0; }
Step: 1 Your Html, First Store the value in your localstorage using javascript then add the line like below ,this is where you going to display the value in your html, my example is based on boostrap :
@Html.Hidden("stringName", "")
Step:2 Javascript
$('#stringName').replaceWith(localStorage.getItem("itemName"));