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 }); }
you can pass object b to other actions on another controller, in this case, SomeAction on SomeController. thank you for your help:)
In your first detail action,
TempData["some-key-here"] = b;
In the action you want to get, SomeAction
SomeObjectY b = (SomeObjectY)TempData["some-key-here"];
Edit: You do not need parameters in RedirectToAction in this way.
Here you can pass objects when redirecting without any magic lines: http://jonkruger.com/blog/2009/04/06/aspnet-mvc-pass-parameters-when-redirecting-from-one-action-to-another /
Source: https://habr.com/ru/post/1731306/More articles:Getting current script executable file name in javascript - javascriptHow to create a WYSIWYG editor in PHP - phpError 404 with IIS 7.0 - iisDirectDraw Overlay - directxDirectX 9 или 10 Overlay - c++Java Concurrency - Web Application - javaMatlab error using m power - matlabiPhone UIWebView stringFromJavaScript with jQuery - javascriptКак настроить точки наблюдения gdb в программе, состоящей из многих файлов на С++? - c++Display icon overlay without restarting - restartAll Articles