title: Ajax.BeginForm does not insert partial view
body: <p>Running ASP.NET MVC 2015 with C#. 
  Trying to add a partial view as a result of @using (Ajax.BeginForm(...)
  All it does is to open a new page with my partial view in it. I found some answers in stackoverflow, but none works for me, unless I missed something. </p>
  
  <p>Scenario: 
  <a href="https://i.stack.imgur.com/NRmhf.png" rel="nofollow noreferrer">index page here</a>
  Type A, B or C and partial view is expected below the current page</p>
  
  <p><a href="https://i.stack.imgur.com/78TOZ.png" rel="nofollow noreferrer">new page unexpected here</a>
  But it does open a new page instead</p>
  
  <p><strong>Controler</strong>:</p>
  
  <pre><code>public class TestController : Controller
  {
      public ActionResult Index()
      {
          return View();
      }
  
      [ChildActionOnly]
      public ActionResult TestPartial()
      {
          ChoiceViewModel vm = new ChoiceViewModel();
          return View(vm);
      }
  
      [HttpPost]
      public ActionResult SelectChoice(ChoiceViewModel vm)
      {
          ModelState.Clear();
          if (vm.MyChoice == "A")
              return PartialView("APartial");
  
          if (vm.MyChoice == "B")
              return PartialView("BPartial");
  
          if (vm.MyChoice == "C")
              return PartialView("CPartial");
  
          return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
      }
  }
  </code></pre>
  
  <p><strong>Index.cshtml:</strong></p>
  
  <pre><code>&lt;h2&gt;Index&lt;/h2&gt;
  &lt;div&gt;
     @Html.Partial("TestPartial")
  &lt;/div&gt;
  &lt;br/&gt;
  &lt;div id="GoesHere"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>TestPartial.cshtml:</strong></p>
  
  <pre><code>@model TestPartial.ViewModels.ChoiceViewModel
  
  @using (Ajax.BeginForm("SelectChoice", new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "GoesHere", InsertionMode = InsertionMode.Replace }))
  {
     &lt;div class="form-group"&gt;
         &lt;p&gt;Give your choice please: A,B or C&lt;/p&gt;
         @Html.TextBoxFor(x =&gt; x.MyChoice, new { @class = "form-control" })
     &lt;/div&gt;
     &lt;div class="form-group"&gt;
         &lt;input type="submit" class="btn btn-primary" value="Select"&gt;
     &lt;/div&gt;
  }
  </code></pre>
  
  <p><strong>APartial.cshtml</strong> (as well as B and C...)</p>
  
  <pre><code>&lt;p&gt;This is A choice&lt;/p&gt;
  </code></pre>
  
  <p><strong>Notes:</strong></p>
  
  <ul>
  <li>Yes, web.config has UnobtrusiveJavaScriptEnabled=true and ClientValidationEnabled=true</li>
  <li>Yes, I installed the jquery.unobtrusive-ajax package </li>
  </ul>
  
  <p>Can you tell me what I missed or did wrong ? 
  Thanks</p>