c# - passing model to RedirectToAction without using session or tempdata? -
c# - passing model to RedirectToAction without using session or tempdata? -
i m modifying existing code.
from 1 action utilize redirecttoaction transfer execution command action. need pass model redirecttoaction well. thought can't done straight passing model 2nd action without using session or tempdata. still want inquire there technique pass model redirecttoaction ? don't want set model in session or tempdata.
thanks
you can seek that, doesn't sense natural action:
public actionresult index() { homecoming redirecttoaction("anotheraction", new { parameter1 = parameter1, parameter2 = parameter2, }); } [httpget] public actionresult anotheraction(modelclass model) { //model.parameter1 //model.parameter2 homecoming view(model); }
c# .net asp.net-mvc asp.net-mvc-4
Comments
Post a Comment