You can return a RedirectResult
[Route("signup/finished")]
public ActionResult DoAny([Deserialize] RegistrationModel rm)
{
return RedirectToActoin("OtherAction");
}
this sends a 302 response to the browser with the new url as the location header value and browser will make a totally new Http request to that action method. So you should not try to pass a complex object.
If the view model data you want to pass is a lean-simple DTO, you can pass that as the routedata parameter. the framework will conver the DTO to querystring and send it.
return RedirectToActoin("OtherAction",rm);
If the object is complex, you should consider some sort of persistence and read it back in the next action method.
You should also consider PRG pattern. PRG stands for POST - REDIRECT - GET. With this approach, you will issue a redirect response with a unique id in the querystring, using which the second GET action method can query the resource again and return something to the view.
[Route("signup/finished")]
public ActionResult DoAny([Deserialize] RegistrationModel rm)
{
// to do : Save to db
var newUserId= 101; //replace with the newly inserted id
return RedirectToAction("OtherAction", "Account", new { userId=newUserId} );
}
public ActionResult OtherAction(int userId)
{
// to do : Get data from userId and build rm object
return View(rm);
}
and in the OtherAction, you will query the data using this unique id and get the data needed.
Also take a look at How do I include a model with a RedirectToAction?