我正在使用TempData在动作之间传递数据,当我在不同的设备上运行我的应用程序时,它非常完美。但是当我在iPhone的 Safari 浏览器上访问它时,我的Work
操作中的TempData为NULL。如果有人知道这个问题是什么,我该如何解决?
代码看起来像这样
[HttpPost]
[HandleApplicationError(ActionName = "Error", ControllerName = "Affiliates")]
public virtual ActionResult Qualify(QualifyViewModel qualify)
{
QualificationViewModel qualifyVM = qualify.QualificationViewModel;
TempData["QualifyViewModel"] = qualify;
return RedirectToAction(Work, Home);
}
[HandleApplicationError(ActionName = "Error", ControllerName = "Home")]
public virtual ActionResult Work()
{
QualifyViewModel qualifyVM = TempData["QualifyViewModel"] as QualifyViewModel;
return Qualify(qualifyVM);
}