title: Controller must either provide JsonResult or redirect to view
body: <p>I have an ExtJs formpanel with standardSubmit: false. On submit, the controller will validate the formdata since some validation will take place on the server (for example a check if the name is unique). If the provided entity is invalid, a JsonResult is sent to the client to notify the user which fields are invalid. That works perfectly. If the entity is valid, it will be stored in the database and the controller must redirect the user to a specific view. </p>
  
  <p>The result is that the HTML provided by the view is sent to the client which expects a JSON-response. Obviously, this does not work.</p>
  
  <pre><code>public override ActionResult Create(FormCollection formCollection)
      {
          Models.Relatie relatie = Repository.CreateNew();
          SetFormValues(relatie, formCollection);
  
          if (ModelState.IsValid)
          {
              _relatieService.CreateRelation(relatie);
              ViewResult view = View("Index");
              return view; //pumps html while client expects JSON
          }
          else
          {
              JsonResult json = Json(new { success = false, errors = ModelState.ToDictionary() });
              return json;
          }
      }
  </code></pre>
  
  <p>I've been looking for a solution for over 8 hours now, can anybody please help me out? </p>