title: Action method in Controller is called eternally
body: <p>I am having trouble with my site that I am creating. Trying to debug it, I noticed that when I hit F5 to run the site, it keeps creating the website on top of the one created earler, and keeps calling the action methods over and over again, and eventually firefox ends up eating all the CPU. I have noticed that it is this code:</p>
  
  <pre><code>Layout = "~/Views/Shared/_Layout.cshtml";
  </code></pre>
  
  <p>that causes it. If I remove this code from the View, it works fine. Any idea what might be the problem?</p>
  
  <p>My view looks like this:</p>
  
  <pre><code>   @model WebApplication1.Models.IndexViewModel
  
  @{
      ViewBag.Title = "Index";
      Layout = "~/Views/Shared/_Layout.cshtml";
  }
  
  &lt;div class="pageContentDiv"&gt;
      &lt;h2&gt;@ViewBag.Title&lt;/h2&gt;
      &lt;p&gt;Lorem&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My Layout looks like this:</p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
      &lt;title&gt;@ViewBag.Title - My ASP.NET Application&lt;/title&gt;
      @Styles.Render("~/Content/css")
      @Scripts.Render("~/bundles/modernizr")
  
      &lt;script src="~/Scripts/jquery-1.10.2.min.js"&gt;&lt;/script&gt;
  
      &lt;link href="~/Scripts/jquery-ui.min.css" rel="stylesheet" /&gt;
      &lt;script src="~/Scripts/jquery-ui.min.js"&gt;&lt;/script&gt;
      &lt;script src="~/Scripts/OwnedScripts/InitializeUI.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
          $(document).ready(function () {
              initUI();
          });        
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div class="topMenu"&gt;
         &lt;div id="topMenuContentDiv" style="margin-left: 110px;"&gt;
             &lt;ul&gt;
                 &lt;li&gt;@Html.ActionLink("Home", "Index", "Home")&lt;/li&gt;
                 &lt;li&gt;@Html.ActionLink("Roads", "Recs", "Home")&lt;/li&gt;
                 &lt;li&gt;@Html.ActionLink("Software", "Software", "Home")&lt;/li&gt;
                 &lt;li&gt;@Html.ActionLink("About", "About", "Home")&lt;/li&gt;
                 &lt;li&gt;@Html.ActionLink("Contact", "Contact", "Home")&lt;/li&gt; 
             &lt;/ul&gt;
         &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="contentDiv" id="#contentDiv"&gt;
          &lt;div id="decor" style="height: 640px; float: right;"&gt;
              &lt;div id="decorPNG" style="background-image: url('../Images/VisualImages/decor.png'); width: 300px; height: 64px;
                  float: right; margin-right: -20px; margin-top: 100px;"&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div id="logoDiv"&gt;
              &lt;h1&gt;QitozNet&lt;/h1&gt;
          &lt;/div&gt;
  
          @RenderBody()
  
        &lt;footer class="footer"&gt;
            &lt;p&gt;&amp;copy; @DateTime.Now.Year - All rights reserved&lt;/p&gt;
            &lt;hr /&gt;
        &lt;/footer&gt;        
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And Controller looks like this:</p>
  
  <pre><code>    using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.Mvc;
  
  namespace WebApplication1.Controllers
  {
      public class HomeController : Controller
      {
  
          public ActionResult Index()
          {
              return View();
          }
  
         public ActionResult Recs()
          {
              return View();
          }
  
          public ActionResult About()
          {
              ViewBag.Message = "Temp";
  
              return View();
          }
  
          public ActionResult Software()
          {
              return View();
          }
  
          public ActionResult Contact()
          {
              ViewBag.Message = "Your contact page.";
  
              return View();
          }        
  
      }
  }
  </code></pre>
  
  <p>The Index method is getting called over and over again, returning in an eternal loop it seems. When debugging it, I kept pressing F10 (step over) for 5 min, and realized that it was just creating the page over again, but on top of the older one, so it ends up duplicating the site</p>
  
  <p>I have also tried to remove the: <code>Layout = "~/Views/Shared/_Layout.cshtml";</code> from the Views, so that they only reside in the: <code>_ViewStart.cshtml</code> but no luck</p>
  
  <p>The initGUI script looks like this:</p>
  
  <pre><code>    function initUI() {
      $(".topMenu").tabs();
      $("#logoDiv").toggle("slide", { direction: 'left' }, 2000);
  
      $("#decorPNG").mouseover(function () {
          $(this).css("cursor", "pointer");
          $(this).draggable({ axis: 'y', containment: "#decor" });
      });
  }
  </code></pre>