title: Passing data between different controller action methods
body: <p>I'm using <code>ASP.NET MVC 4</code>. I am trying to pass data from one controller to another controller.  I'm not getting this right.  I'm not sure if this is possible?</p>
  
  <p>Here is my source action method where I want to pass the data from:</p>
  
  <pre><code>public class ServerController : Controller
  {
       [HttpPost]
       public ActionResult ApplicationPoolsUpdate(ServiceViewModel viewModel)
       {
            XDocument updatedResultsDocument = myService.UpdateApplicationPools();
  
            // Redirect to ApplicationPool controller and pass
            // updatedResultsDocument to be used in UpdateConfirmation action method
       }
  }
  </code></pre>
  
  <p>I need to pass it to this action method in this controller:</p>
  
  <pre><code>public class ApplicationPoolController : Controller
  {
       public ActionResult UpdateConfirmation(XDocument xDocument)
       {
            // Will add implementation code
  
            return View();
       }
  }
  </code></pre>
  
  <p>I have tried the following in the <code>ApplicationPoolsUpdate</code> action method but it doesn't work:</p>
  
  <pre><code>return RedirectToAction("UpdateConfirmation", "ApplicationPool", new { xDocument = updatedResultsDocument });
  
  return RedirectToAction("UpdateConfirmation", new { controller = "ApplicationPool", xDocument = updatedResultsDocument });
  </code></pre>
  
  <p>How would I achieve this?</p>