title: Setting Layout to null in _Layout.cshtml
body: <p><strong>Is there a reason why you would want to set the Layout property to null in a _Layout.cshtml?</strong></p>
  
  <p>For example, like this, before rendering the body view?</p>
  
  <pre><code>    ...
      &lt;section id="content"&gt;
          @{ Layout = null; }
          @RenderBody()
      &lt;/section&gt;
      ...
  </code></pre>
  
  <p>It seems pretty nonsensical to me, and removing the line setting Layout doesn't change the way page loads work observationally.</p>
  
  <p><strong>Is there <em>any</em> reason why you would want to set the Layout property in _Layout.cshtml?</strong></p>