TempData无法在iPhone的Safari浏览器中使用

时间:2018-06-14 07:33:53

标签: iphone asp.net-mvc browser safari tempdata

我正在使用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);
}

0 个答案:

没有答案