var a = $(‘#name’).val();
int b = a //?? can not access to a
Sounds interesting. But looks like, it is not possible but reverse is possible due to the sequence of execution. MVC Razor at server side (before sending to client), JS at client side.