title: Passing ViewModel (containing request parameters) across Controllers
body: <p>I have few questions based on following scenario:</p>
  
  <p>I have a LoginController with following methods:</p>
  
  <pre><code>public ActionResult Login()
  {
      return View();
  }
  
  [HttpPost]
  public ActionResult Login(UserObject user)
  {
  
      Calling Besiness Service to Validate User againts DB (Using Repository)...  
  
      if (success)
      {
          return RedirectToAction("Search", "Search");
      }
      else
      {
          ModelState.AddModelError("", "The user name or password provided is incorrect.");
      }
      return View(user);
  }
  </code></pre>
  
  <p>After successful login, I have to present a Search screen. I have a SearchController with following methods:</p>
  
  <pre><code>public ActionResult Search()
  {
      return View(); // This returns a EMPTY Search Form.
  
  }
  
  [HttpPost]
  public ActionResult Search(SearchView search)
  {
      // Validate Search parameters...
      // I have to perform a search by calling Business Service and present results. I would like to use a seperate controller (PricingController) for this task.
      return RedirectToAction("Index", "Pricing"); // Not sure if this is the correct way?
  }
  </code></pre>
  
  <p>Now I would like to have a PricingController which will take "SearchView" ViewModel containing my search parameters and call a Business Service to get the pricing results and present it to the user. </p>
  
  <p>Is this a correct approach? How do I pass the "SearchView" ViewModel containing my search parameters to PricingController from SearchController? I need access (data) to "SearchView" ViewModel throughout the application because user can add optional items based on initial search criteria and can modify this search criteria if required. Should I store "SearchView" ViewModel in Cache? I will be deploying my application in Web Farm and don't want to use Http Session. I will be using Cookies for managing user sessions.</p>