Global javascript variable in C# MVC4
===

I followed the answer [here][1] by defining the js variable ahead. However the scope of that variable doesn't stay if I go to another page when browsing. Which seems reasonable since I do go to another page in the browser. So I wonder how can I save the js variable across multiple pages when I'm browsing? Do I need to use session variables, querystring in C#? Or is there any better solution?


  [1]: http://stackoverflow.com/questions/2932782/global-variables-in-javascript-across-multiple-files