OK, been trying things for hours and could use some help. I'm trying to implement a page in MVC 3 that has "back" and "next" buttons. When the back button is clicked I want to disable client-side MVC validation from running so that my action method will run and send the user to the previous logical web page. I've tried this:
<script type="text/javascript">
document.getElementById("backButton").disableValidation = true;
</script>
and this:
<input type="submit" name="backButton" value="← Back"
title="Go back to step 1." disableValidation="true" />
But no matter what, the cilent-side validation JavaScript kicks in and won't let the button do its post-back. I'm thinking that disableValidation
only works in MVC 2 perhaps, and I'm supposed to be doing something else in MVC 3, but cannot seem to find any examples.