title: How to detect whether a browser enables javascript s.t. the master page can make a proper response?
body: <p>I am developing a site using Asp.net MVC 3 with Razor.</p>
  
  <p>In the <code>_Layout.cshtml</code> (the master page) I want to put a logic based on whether or not the browser enables javascript.</p>
  
  <p>What is the simplest way to make this logic?</p>
  
  <p>For the sake of simplicity, let the master  page just output as follows:</p>
  
  <pre><code>@if(....)//need to modify
  { &lt;p&gt;javascript enabled...&lt;/p&gt;}
  else {&lt;p&gt;javascript disabled...&lt;/p&gt;}
  </code></pre>