title: Adding Script files to an MVC4 application and _ Layout.cshtml confusion
body: <p>This may be a case that I am remembering this wrong, but...</p>
  
  <p>I am creating an MVC4 application and in the index page I am looking to add two .js files:</p>
  
  <pre><code>    &lt;script type="text/javascript" src="~/Scripts/fullcalendar.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="~/Scripts/moment.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>This adds the files, but does nothing with them. The only time I get the desired result is when I also add the files to <code>_Layout.cshtml</code>.</p>
  
  <p>I'm sure in past projects I could add .js files to a page and it would work great, why is it that when starting a project from scratch I need to put everything in the <code>_Layout.cshtml</code> file? Am I doing something wrong?</p>
  
  <p>Edit:
  The only code in the index.cshtml file is:</p>
  
  <pre><code>&lt;link rel='stylesheet' href='~/Content/fullcalendar.css'&gt;
  &lt;script type="text/javascript" src="/Scripts/fullcalendar.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="/Scripts/moment.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
      $(document).ready(function () {
  
          $('#calendar').fullCalendar({
              header: {
              left: 'prev, next today',
              center: 'title',
              right: 'month, agendaWeek, agendaDay'
          },
          defaultView: 'month',
          firstDay: 1,
          editable: true,
          selectable: true,
          slotMinutes: 60
      });
  });
  &lt;/script&gt;
  &lt;body&gt;
      &lt;div id='calendar'&gt;&lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Which renders fine when the scripts are also in `_Layout.cshtml' but doesn't when they are not.</p>