User-1038772411 posted
Hello, binustrat
you can use TempData for keep and peek data in asp.net mvc.
How to user Tempdata please refer below code and reference link :
//Controller Action 1 (TemporaryEmployee)
public ActionResult TemporaryEmployee()
{
Employee employee = new Employee
{
EmpID = "121",
EmpFirstName = "Imran",
EmpLastName = "Ghani"
};
TempData["Employee"] = employee;
return RedirectToAction("PermanentEmployee");
}
//Controller Action 2(PermanentEmployee)
public ActionResult PermanentEmployee()
{
Employee employee = TempData["Employee"] as Employee;
return View(employee);
}
Reference link :
https://www.codeproject.com/Articles/786603/Using-TempData-in-ASP-NET-MVC
Thanks