title: Passing object from one action method to another in ASP.NET MVC 3
body: <p>I am using ASP.NET and MVC 3 in visual studio and have a question about passing an object from one action method(called <code>Search</code>) to another(called <code>SearchResult</code>). I tried using ViewData but it didnt persist down to the View of SearchResult. Below is a snippet of my code, from within a single controller. 'Search' gets called when data has been collected from a form and submit has been called(hence the <code>[HttpPost]</code> declaration):</p>
  
  <pre><code>[HttpPost]
  public ActionResult Search(Search_q Q){
   // do some work here, come up with an object of type 'Search_a' 
   // called 'search_answer'.
  ViewData["search_answer"] = search_answer;
  return RedirectToAction("SearchResults");
  }
  
  public ActionResult SearchResult(Search_a answer)
  {   
  return View(answer);
  }
  </code></pre>
  
  <p>I also tried using <code>RedirectToAction("SearchResults", new {answer = search_answer});</code> instead of the above call to RedirectToAction but my 'search_answer' still didnt persist to the View. What is the best way to send this <code>Search_a</code> object to the <code>SearchResult</code> View?</p>