I have a controller that handles three actions that are specific to my problem.
The first is the edit action which returns a view with an HTML form that the user can edit properties on the given item.
The second is the update action which accepts the post back form the browser and updates the database. When the update is successful we do a redirect to action.
The third is the show action which shows the details of the given item. This action is where we get redirected to after a successful update.
The flow is:
Show -> Edit -> Update (Sucess: y -> redirect to Show, n -> return Edit)
What I want to achieve is to have a flag tripped when the update was successful so that on the next Show view I can display a confirmation message for the user. The problem is that I'm not 100% sure on the best way to carry that data over the RedirectToAction() call. One thought I had was using a query string? We are already carrying variables around with the query string for another purpose but part of my is skeptical to abuse that. The call to the redirect is below.
RouteValueDictionary dict = Foo.GetRouteValues(bar);
RedirectToAction("Show", dict);
I've read this question as well but am leary about using the TempData property if I don't have to.
Thanks for some suggestions!