Multistep form .net
I'm working in .net MVC3. I have a multi step form
- step1: fillin username, password, confirm password
- step2: fill in additional inf开发者_开发知识库o
problem: once user fills in step1 he/she should not be able to go back. however there is always a case where user clicks browser 'back' button. in that case all the info (except password) is pre-filled. I want to aler user (in step2) when back button is clicked that none of the info in step 1 will be updated OR somehow disable back button. is that possible? what are some valid solutions? thanks
As Darin said, you cannot disable the back button.
However, what you can do is make the multi step form submit each step via ajax. That way, a back button will not take them to the previous step in the form, but to the page they were on before they started the form.
You cannot disable the back button. You could try cheating by putting the following script in the view of step 1:
<script type="text/javascript">
history.go(1);
</script>
精彩评论