Is it possible to assign javascript variable to c# variable in mvc razor view? e.g.
Also
No.
C# runs on the server; Javascript runs on the client. It does not make sense to have them interact.
You should use AJAX.
The short and long answer is: NO.
All these scenarios should be covered by AJAX calls to the server