For others ... ASP.NET MVC 2 has made some changes to TempData. Below is a blog post . In short:
... The result of the changes led to the following rules that determine how TempData works:
- Items are only deleted with
TempData at the end of the query if they were marked for deletion. - Items are marked for deletion only when they are read.
- Elements can be untagged by calling
TempData.Keep(key) . RedirectResult and RedirectToRouteResult always calls TempData.Keep() .
ongle
source share