title: ASP.net MVC Controller will not return view
body: <p>Still kinda new to ASP.net and I have this strange problem.  Its a very basic scenario but something is up and I can't figure it out.  Deploy should return a view named Deploy that is typed to the model CompiledAppModel.  However, when you click install in the view it never leaves the page despite calling the return View() method.  Any ideas?</p>
  
  <p>Here is my controller:</p>
  
  <pre><code>[HttpPost]
  public ActionResult Deploy(string key_name, string custom_folder = "")
  {
      string userId = Membership.GetUser().ProviderUserKey.ToString();
      UserDataModel user_info = _user_data_service.getUserDataByPrimaryIDNoDB(userId, HttpContext.Cache);
      log.Trace("Deploy was called. key_name:" + key_name + " UID: " + user_info.UID);
  
      // first we'll call the info to install remote application
      bool serviceInstall = _fms_app_service.DeployFmsApp(user_info, key_name, custom_folder);
  
      // then we'll call to generate client side info
      bool clientInstall = _fms_app_service.CompileClientApp(user_info, key_name);
  
      var model = _fms_app_service.getInstalledAppInfo(user_info, key_name);
      if (serviceInstall &amp;&amp; clientInstall)
      {
          return RedirectToAction("Deploy", model);
      }
  
      return View("Error");
  }
  </code></pre>
  
  <p>and my view:</p>
  
  <pre><code>@model IEnumerable&lt;Models.Applications.FmsAppModel&gt;
  
  @foreach (var item in Model) {
      &lt;div class="col"&gt;
          &lt;h2&gt;@Html.DisplayFor(modelItem =&gt; item.friendly_name)&lt;/h2&gt;
          &lt;p&gt;@Html.DisplayFor(modelItem =&gt; item.app_description)&lt;/p&gt;
          &lt;p&gt;&lt;strong&gt;Tags:&lt;/strong&gt; @Html.DisplayFor(modelItem =&gt; item.app_type)&lt;/p&gt;
  
          &lt;a href="#" class="btn btn-primary install-app" data-key-name="@(item.key_name)"&gt;Install&lt;/a&gt;
  
          @Html.ActionLink("Details", "Detailss", new {  id=item.app_id  })
      &lt;/div&gt;
  }
  &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
     (function () {
          $('.install-app').on('click', function (e) {
              e.preventDefault();
              var data_key_name = $(this).data('key-name');
              //ajax install app
              $.ajax({
                  type: "POST",
                  url: '@Url.Action("Deploy")',
                  data: {
                      key_name: data_key_name
                  }
              });
          });
      })();
  &lt;/script&gt;
  </code></pre>
  
  <p>And the model.</p>
  
  <pre><code>public class CompiledAppModel
  {
      [Display(Name = "Admin URL")]
      public string adminURL { get; set; }
  
      [Display(Name = "Viewer URL")]
      public string viewerURL { get; set; }
  
      [Display(Name = "Embed URL")]
      public string embedURL { get; set; }
  }
  </code></pre>