Say you are in a world where you want to use progressive enhancement (sometimes for accessibility)
with ASP.NET MVC 3+.
Now say you have something like comments that will be on multiple pages.
You want the site to be maintainable so you want to use a partial with
This means that the partial will submit to a different controller than
the page you are currently on.
to ajax the form submission (jquery post) and the only part
of the page that reloads is the form area. You also use
client side validation.
url. But when there are validation errors you need to present
the same page you were on. But how do you do that?
This outlines a possible solution.
and we've implemented this, but we are not happy with it, so
I left that part out of this example. Please see
http://stackoverflow.com/a/5188833 for what we based our solution
We have an explicit opt in to share the ModelState, but every action
is enabled, we don't even use this code.