How to Persist data in TempData

public ActionResult Index()
{
  ViewBag.Message = TempData["Message"];
  Employee emp = TempData["emp"] as Employee; //need type casting
  TempData.Keep();//persist all strings values
  return View();
}

results matching ""

    No results matching ""