title: ASP MVC Define Section in Partial View
body: <p>As the title states, I want to define a section in a partial view.</p>
  
  <p>My code that I've tested with are as follows:</p>
  
  <p>Controller:</p>
  
  <pre><code>public ActionResult Test()
  {
      return View();
  }
  
  public ActionResult PartialTest()
  {
      return PartialView("_PartialTest");
  }
  </code></pre>
  
  <p>Test.cshtml:</p>
  
  <pre><code>@{
      ViewBag.Title = "Test";
  }
  
  &lt;h2&gt;Test&lt;/h2&gt;
  
  @Html.Action("PartialTest")
  </code></pre>
  
  <p>_PartialTest.cshtml:</p>
  
  <pre><code>&lt;p&gt;partial Test&lt;/p&gt;
  
  @section scripts {
      &lt;script type="text/javascript"&gt;
          $(document).ready(function() {
              alert("Test");
           });
       &lt;/script&gt;
  }
  </code></pre>
  
  <p>Placing the section <code>scripts</code> in the Test.cshtml works fine so the problem isn't in the layout.</p>
  
  <p>Anyone know how to do this?</p>