title: Asp.Net MVC3 RC Razor views : syntax for embedding code inside <javascript> block
body: <p>Having trouble embedding c# code inside a javascript block with <strong>MVC3 RC1</strong> razor view. What syntax should I use to make this working? I get warnings eg. Expected constant on the isOk variable among other. (Without text tag, the following code is not recognized as javascript)</p>
  
  <pre><code>@{bool isOk = true;}
  
  &lt;script type="text/javascript"&gt;
      var tmp1 = "";
      @if (isOk)
      { 
          &lt;text&gt;
              var tmp=""; // this should be interpreted as javascript
          &lt;/text&gt;       
      }
  &lt;/script&gt;
  </code></pre>