I'm using the AcceptVerbs
method detailed in Scott Gu's Preview 5 blog post for dealing with form entries in ASP.NET MVC:
So I don't have to use TempData
. That said, I now have to add a 'confirm' step to this process, and it seems to require the use of TempData
.
For some reason, I have an aversion to using TempData
-- that it is something to be designed around.
Is this at all a valid concern, or am I making it up?
I kind of think of temp data as being a fire-and-forget mechanism for notifying the user. Its great to give them a reminder of something they recently did, but I'd also be hesitant to make it a required step in some user process. The reason being if they refresh the page, I believe it would be gone. Well I guess I'm also hesitant to use it as its not really well defined how reliable it is.
I wonder if the problem is that you're having the action redirect to another page before the confirm step. I wonder if instead after they first submit, you could do enough processing to generate the confirm dialog, then return the original page with the confirm question. Similar to how you might do validation, except the validation rule checks whether the confirmation step was performed (with the confirmation UI hidden until other validation passes).