I have an issue with sessions in an MVC3 application. In one controller I am receiving a post request then adding the value to session before redirecting to the controllers get method.
The issue is that in the GET request the session value returns null even though in the POST request the sessions value was set.
[HttpPost]
public ActionResult findPerson(PersonSearch searchDetails)
{
Session["FindPersons"] = searchDetails;
return RedirectToAction("findperson");
}
[HttpGet]
public ActionResult findperson()
{
PersonSearch searchDetails = (PersonSearch)Session["FindPersons"];