title: Redirect to View from AJAX call on error
body: <p><strong><em>Problem:</em></strong>
  I would like to load a partialview into a DIV when success, but in case an error happened I need to redirect to the view home page. The issue is that  the Redirect to Action is also loaded into the div <code>resultdisplay</code>.
  How should I manage the errorhandling to Redirect to fullviews in case of error?</p>
  
  <p><strong><em>Code:</em></strong> </p>
  
  <p><em>Ajax call:</em></p>
  
  <pre><code>function GetFilteredValuesCallback(values) {
      var data = JSON.stringify(values);
      var url = '/Controller/Action';
      $.ajax({
          type: 'GET',
          url: url,
          data: { filter: data },
          success: function (result) {
              $('#resultDisplay').html(result);
          }
      });
  }
  </code></pre>
  
  <p><em>Action:</em></p>
  
  <pre><code>public ActionResult Action(string filter)
  {
      MyModel model = null;
      try
      {
          // Do stuff with my model ...
          throw new Exception("ERROR!");
      }
      catch (Exception ex)
      {
          // In case of error redirect to home page
          return RedirectToAction("Index");
      }
      return PartialView("_PartialView", model);
  }
  </code></pre>