Passing Object from controller to other controller
asp.net-mvc, c#, c#-4.0
Solution
In your first action, Detail,
TempData["some-key-here"] = b;
In the action you want to receive the object, SomeAction
SomeObjectY b = (SomeObjectY)TempData["some-key-here"];
Edit: you don't need the parameters in the RedirectToAction this way.
Problem
Here is the problem, i have one controller: ``` [AcceptVerbs(HttpVerbs.Post)] public ActionResult Detail(SomeObjectX a) { SomeObjectY b = new SomeObjectY(); b.merge(a); //i already have merge method. return RedirectToAction("SomeAction", "SomeController", new { c = b }); } ``` is it possible to pass object b to other action on different controller, in this case, to SomeAction on SomeController. thanks for your help :)