阻止用户表单重定向到下一页 [英] Prevent user form redirecting to the next page

查看:120
本文介绍了阻止用户表单重定向到下一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的网络应用程序中,我有一个四页(icform1.aspx,icform2.aspx ... icform4.aspx),这将在用户首次登录时显示。用户必须完整地填写页面(icform1,icform2,icform3,icform4)。在第一页(icform1.aspx)中,如果任何用户直接键入下一页url(icform2.aspx),应用程序将导航到连续页面而不完成它。我希望用户在第一页中直接输入URL时导航到同一页面或登录页面。

In my web application , i'm having a four page (icform1.aspx,icform2.aspx...icform4.aspx) which will get displayed when a user login for the first time.The user have to complete pages correspondongly (icform1,icform2,icform3,icform4). In the first page (icform1.aspx) if any user directly type the next page url (icform2.aspx), application will navigate to the successive pages without finishing it. I want the user to navigated to the same page or login page when he directly type the URL in the first page.

推荐答案

您可以使用 URL ReWriting。 [ ^ ]&当他/她转移到注册的其他部分时,从不向用户显示其他表单。



其他方式:创建一个会话变量,以保持注册表单的轨道。如果用户打开第一个表单,则会话变量值变为form1,如果用户从form1转换为form2会话变量值变为form2,则在表单2页面加载时,您可以检查此会话变量的值。如果它与form2不匹配,则重定向到form1。



看到有很多方法可以解决这个问题。它取决于你如何实现它。
You can use URL ReWriting.[^] & never shows the other forms to user while s/he moves to other part of registration.

Other way: create one session variable which keeps the track of registration form. if user opens the first form the session variable value becomes form1, if user transit from form1 to form2 the session variable value becomes form2, at the time of form 2 page load you can check the value of this session variable. if its not matching with form2 then redirect to form1.

see there are so many approaches to handle this issue. its up to you how you wanna achieve it.


这篇关于阻止用户表单重定向到下一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆