I'm rendering a common Log-In form using Html.RenderAction, on every page of my site.
If the user enters their details into the text-box and clicks 'Submit', it does a POST to a controller that handles the log in.
If they make a mistake, such as entering an invalid email address, it will populate the ModelState with an error message and then redirect back to whatever page they were on before.
The problem is, because RenderAction occurs as a separate request, I'm losing the ViewModel.
Even when I put it into TempData it gets lost, since TempData is flushed on each separate request.
Is there a way of preserving data between consecutive Html.RenderAction calls?
If not, any suggestions on how I might be able to hack this? (Should put the data in Session?)