开发者

Multistep form .net

I'm working in .net MVC3. I have a multi step form

  1. step1: fillin username, password, confirm password
  2. 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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜