So, if I do this in the first controller:
public class AController:Controller
{
public ActionResult ActionOne()
{
MyObject myObj = new MyObject()
myObj.Name="Jeff Atwood";
myObj.Age =60;
myObj.Address = new Address(40,"Street");
return RedirectToAction("ActionTwo", "BController", myObj );
}
}
In the second controller, myObj will exit normally, but the address will be empty.
public class BController:Controller
{
public ActionResult ActionOne(MyObject obj)
{
}
}
Is this as expected? in any way around him?
source
share