title: AJAX POST to MVC Controller showing 302 error
body: <p>I want to do AJAX POST in my MVC View. I've written the following:</p>
  
  <p><strong>Script Code in View</strong></p>
  
  <pre><code>$('#media-search').click(function () {
      var data = { key: $('#search-query').val() };
  
      $.ajax({
          type: 'POST',
          url: '/Builder/Search',
          data: JSON.stringify(data),
          dataType: 'json',
          contentType: 'application/json; charset=utf-8',
          success: function (data) {
              $('.builder').empty();
                  alert("Key Passed Successfully!!!");
          }
      });
  });
  </code></pre>
  
  <p><strong>Controller Code</strong></p>
  
  <pre><code>[HttpPost]
  public ActionResult Search(string key)
  {
      return RedirectToAction("Simple", new { key=key });
  }
  </code></pre>
  
  <p>But on AJAX POST I am getting the <strong>302 found Error</strong> </p>