title: Pass data to a @section in MVC
body: <p>I know you can't use @RenderSection to pass data but what would be the equivalent to achieve the below?  I'm trying to send back to a partial view that value of item.Enabled</p>
  
  <p>This is the layout page for a drop down DropDown.cshtml:</p>
  
  <pre><code>@foreach (var item in Model.Items){
      &lt;li&gt;
          @RenderSection("Item", false)//How to pass 'item.IsChecked' back ?
          &lt;span class="key"&gt;@item.Key&lt;/span&gt;
          &lt;span class="value"&gt;@item.Value&lt;/span&gt;                  
      &lt;/li&gt;
  }
  </code></pre>
  
  <p>This partial view that calls the above. I want to use this when specifically creating drop downs with check boxes.</p>
  
  <pre><code>@model DropDownCheckBox
  @{
      Layout = "~/Views/Shared/DropDown.cshtml";
  }
  @section Item{
      &lt;input type="checkbox" @(Model.IsChecked ? "checked=yes" : string.Empty) /&gt;
  }
  </code></pre>