title: Set a javascript variable from mvc controller
body: <p>Is it possible to set a javascript variable from a c# controller?  We have a situation where we override our master page with a dumb downed version that doesn't require login for users.  However, our javascript timeout timer still runs.  I would like to in the controller method that overrides the master, to override the timeout to something huge.</p>
  
  <pre><code>public dumbDownController()
  {
       ViewData["MasterPageOverride"] = "~/Views/Shared/_NoLogin.cshtml";
  
       //Somehow reset that timer below from 20 to like 9999. To simulate no timeout.
  
       return View("Cities", model);
  }
  </code></pre>
  
  <p>Then our javascript file has.</p>
  
  <pre><code>tb.sessionTimer = (function () {
     var SESSION_TIMEOUT = 20;
     var currentTimeoutCounter = SESSION_TIMEOUT * 60;
   ...
   lots more irrelevant to question
   ...
   }
  </code></pre>
  
  <p>Large app, so looking to barely change the javascript.  Would like to handle it from the controller.</p>