In the controller you need to be aware of the difference between ViewData and TempData in relation to redirects. I want to make it possible to put something in ViewData under a unique key and if the page is redirected move it to TempData right before the redirect.
I was initially thinking about the Application.EndRequest event, but I don't know how to get to the ViewData or TempData from their. I can get the MvcHandler or RouteHandler, but neither seems to give me access to ViewData or TempData, or to the controller for that matter.
How can I do this?
Thanks!