keep viewdata on RedirectToAction

后端 未结 5 1611
深忆病人
深忆病人 2021-02-01 01:40
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult CreateUser([Bind(Exclude = \"Id\")] User user)
{
        ...
        db.SubmitChanges();
        ViewData[\"info\"] = \         


        
5条回答
  •  星月不相逢
    2021-02-01 02:19

    Since TempData appears to use storage, and any form of ITempDataProvider that is not "in-process", requires the object to be Serializable, TempData seems woefully inadequate in web farm situations... (ViewDataDictionary isn't itself serializable...) Does anyone have any suggestions for this?

提交回复
热议问题