title: Why do some submits replace the whole view and some not when using Ajax.BeginForm?
body: <p>We are using Ajax.BeginForm on an MVC4 Razor page, and we're having problems doing a normal submit. If we post using <code>&lt;input id="Reset" type="submit" value="Reset" /&gt;</code>, the entire page will be replaced with the partial view we're returning, but if we add an onchange event to a checkbutton (<code>@Html.CheckBoxFor(m =&gt; m.MyValue, new { onchange = "$(this).closest('form').submit();" })</code>) it works and the partial view gets replaced as it should. How come one type of submit works and not the other?</p>
  
  <p><strong>Update:</strong> It works on the first submit, but not the second.</p>
  
  <p>We've tried adding an onclick event with the same call as the onchange event has, but same thing happens. <code>jquery.unobtrusive-ajax.js</code> is referenced. There is a 404 on the network tab for <code>jquery-1.10.0.min.map</code> which is referred to in a comment on <code>jquery-1.10.0.min.js</code>, but we've tried removing it and still getting the same result. <code>UnobtrusiveJavaScriptEnabled</code> is set to true in the web.config. The div that we want to replace is located within the form and we have set <code>UpdateTargetId</code> to its id when specifying the AjaxOptions.</p>
  
  <p>View:</p>
  
  <pre><code>@using (Ajax.BeginForm(
      new AjaxOptions
          {
              HttpMethod = "Post", 
              UpdateTargetId = "FilteredList", 
              InsertionMode = InsertionMode.Replace
          }))
  {
      // google map javascript etc removed for brevity
  
      &lt;div id="FilteredList"&gt;
  
          // html code removed for brevity
  
          // this works
          @Html.CheckBoxFor(m =&gt; m.MyValue, new { onchange = "$(this).closest('form').submit();" })
  
          // this doesn't work
          &lt;input id="Reset" type="submit" value="Reset" /&gt;
  
      &lt;/div&gt;
  }
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>[HttpPost]
  public ActionResult Index()
  {   // logic to get the model
      return PartialView("FilteredList", model);
  }
  </code></pre>
  
  <p>Scripts:</p>
  
  <pre><code>&lt;script type="text/javascript" src="@Url.Content("~/Scripts/jquery-1.10.0.min.js")"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="@Url.Content("~/Scripts/jquery-easing-1.3.min.js")"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="@Url.Content("~/Scripts/jquery-cycle-3.0.2.all.js")"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="@Url.Content("~/Scripts/libs/bootstrap.js")"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")"&gt;&lt;/script&gt;
  </code></pre>