title: Error when accesing Razor Boolean variable in Javascript
body: <p>I have tried several tactics to use the boolean value within the JS ,but nothing works :</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  var model = @Html.Raw(Json.Encode(Model));
         if (model.IsNew == true) {
          alert("1");
       }
  &lt;/script&gt;
  </code></pre>
  
  <p>Tried the following:<br/></p>
  
  <pre><code>var IsNew = @Model.IsNew ;
  var IsNew = "@Model.IsNew";
  </code></pre>
  
  <p>I keep getting the following error :  <br/></p>
  
  <pre><code>Conditional compilation is turned off
  </code></pre>
  
  <p>Anyone could explain why this occurs and maybe guide me to a possible solution ? </p>