title: Trouble sending JSON data to another action in asp.net MVC controller
body: <p>I have this controller action:</p>
  <pre><code>[HttpPost]
          public ActionResult OrderData(Order order)
          {
              var result = new { redirectToUrl = Url.Action(&quot;SeatSelection&quot;, &quot;Orders&quot;, new { id = order.ScreeningId }), order };
  
              return Json(result);
          }
  </code></pre>
  <p>and I'm trying to pass the order object to another action:</p>
  <pre><code>public ActionResult SeatSelection(int id, Order order)
          {
              var screeningInDb = _context.Screenings.Include(s =&gt; s.Seats).Single(s =&gt; s.Id == order.ScreeningId);
  
              var viewModel = new SeatSelectionViewModel
              {
                  Seats = screeningInDb.Seats,
                  NumberOfTicketsOrdered = order.NumberOfTicketsOrdered
              };
  
              return View(&quot;SeatSelection&quot;, viewModel);
          }
  </code></pre>
  <p>The problem is - the only parameter I'm receiving in <code>SeatSelection</code> Action is the id parameter, although the order object in <code>OrderData</code> Action is valid. I'm pretty sure the problem is within the way I'm trying to pass the order object, maybe something with the syntax?</p>
  <p>Here is the way I'm posting my form data to the <code>OrderData</code> Action:</p>
  <pre><code>$.ajax({
                      type: &quot;POST&quot;,
                      url: '@Url.Action(&quot;OrderData&quot;, &quot;Orders&quot;)',
                      contentType: &quot;application/json; charset=utf-8&quot;,
                      data: JSON.stringify(orderData),
                      dataType: &quot;json&quot;,
                      success: function (res) {
                          alert(&quot;Success!&quot;);
                          window.location.href = res.redirectToUrl;
                      },
                      error: function (xhr, status, error) {
                          alert(status);
                      }
                  });
  </code></pre>
  <p>Bottom line - What I'm eventually trying to do is to pass the form to a Controller Action where the data will be processed, and then pass the new data to &quot;SeatSelection&quot; view. I had trouble doing this as my post method sends JSON data, so if there is a better way to do what I'm trying to do, I would be happy to learn!</p>