Archives
Archives /
2009
-
ASP.NET MVC – Multiple buttons in the same form
I keep seeing this question in forums and on twitter so I thought I’d post all the various ways you can handle this and what the pros and cons are.
-
ASP.NET MVC ModelState should work like TempData
I prefer to have the actions that forms post to just process the posted data and then redirect to a different action for viewing the results. So in order to pass validation errors back to the form action I need ModelState to work like TempData does. In fact it seemed that before ModelState was added that one of the most common scenarios for using TempData was passing validation error messages between actions so I’m not sure why it doesn't already work like this. I’m using RC2 so its doubtful this will change before RTM. :(
-
Interesting finds 3/13/2009
As soon as I get some time I need to look at these a little closer: