title: Difference between RenderBody and RenderSection
body: <p>In <strong><em>MVC/Razor</em></strong> syntax, I'm trying to understand why we need <code>@RenderBody</code>.  </p>
  
  <p>For example (code taken from <a href="http://blog.overridethis.com/blog/post/2010/11/13/Learning-Razor-Shared-Content-Layout.aspx">example</a>)</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;meta charset="utf-8" /&gt;
          &lt;title&gt;My WebSite&lt;/title&gt;
          &lt;style&gt;
              #container { width: 700px; }
              #left { float: left; width: 150px; }
              #content { padding: 0 210px 0 160px; }
              #right { float: right; width: 200px; }
              .clear { clear: both; }
          &lt;/style&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div id="container"&gt;
              &lt;div id="left"&gt;
                  @RenderSection("left", required:false)
              &lt;/div&gt;
              &lt;div id="content"&gt;
                  @RenderBody()
              &lt;/div&gt;
              &lt;div id="right"&gt;
                  @RenderSection("right", required:false)
              &lt;/div&gt;
              &lt;div class="clear"&gt;&lt;/div&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  
  
  @{
        Layout = "~/_3ColLayout.cshtml";
  }
  
  &lt;h1&gt;Main Content&lt;/h1&gt;
  
  @section left {
      &lt;h1&gt;Left Content&lt;/h1&gt;
  }
  
  @section right {
      &lt;h1&gt;Right Content&lt;/h1&gt;
  }
  </code></pre>
  
  <p>Why can't I simply use <code>@RenderSection</code> for everything, like this:</p>
  
  <pre><code>&lt;div id="content"&gt;
       @RenderSection("Body", required:true)
  &lt;/div&gt;
  
  @section Body{
      &lt;h1&gt;Body Content&lt;/h1&gt;
  }
  </code></pre>