title: Access C# variable in js script
body: <p>In the past I've accessed variables from other java scripts by doing</p>
  
  <pre><code>static var somevar;
  </code></pre>
  
  <p>In one script. And in the other:</p>
  
  <pre><code> OtherScript.somevar;
  </code></pre>
  
  <p>But I need to access a variable from C# code in a js script. I've tried:</p>
  
  <pre><code>Public static bool somevar;
  </code></pre>
  
  <p>In the C# file and in the js file:</p>
  
  <pre><code>OtherScript.somevar;
  </code></pre>
  
  <p>But I get the error: Unknown identifier 'somevar' in the js file</p>