title: Insert user control's JavaScript into a section in _layout.cshtml
body: <p>I have a user control that makes use of jQuery's <code>ready</code> method. Since this control's JS requires jQuery, jQuery needs to be included before the control's JS.</p>
  
  <p>I am including jQuery in the footer of my master page and then define a section ("FooterJS") where all pages can insert their JS code:</p>
  
  <p><strong>_Layout.cshtml</strong></p>
  
  <pre><code>&lt;script&gt;{path to jquery}&lt;/script&gt;
  @section FooterJS
  </code></pre>
  
  <p>The problem is that the user control does not use the master page directly. Instead, the control is being included by the Index.cshtml page so it cannot add its JS into the FooterJS section.</p>
  
  <pre><code>@Html.Partial("MyControl")
  </code></pre>
  
  <p>How can I get the control's JS to be added after I include jquery on the master page?</p>