Thursday, February 2, 2012

TempData is for redirects, and redirects only.

TempData["foo"] = "bar";

...is not going to linger as long as...

Session["foo"] = "bar";

 
 

http://stackoverflow.com/questions/1500402/when-to-use-tempdata-vs-session-in-asp-net-mvc suggests it is "for redirects, and redirects only."

No comments:

Post a Comment