Click here to Skip to main content
15,884,032 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello guys,

Let's say when I run my web application on my locahost, and the url in the broswer is like ~/Page1.

If the user changes the url from "~/Page1" to "~/Page2", they will be redirected to "~/Page2".

Is there any way for me to prevent this url modification? Since I need the user to be able to complete the required actions on Page1 before they can proceed to Page2.

Any help will be appreciated.

Thanks in advance.
Posted
Comments
Tejas Vaishnav 16-Dec-14 2:00am    
Is my answer solve your question then mark my answer as solution and don't forget to rate it.
Member 10915623 16-Dec-14 21:24pm    
Thanks for the solution, nearly forgot about marking it

1 solution

=> Do one thing, you can create some session which is only contains valid data when user has finished steps over first page.

=> check that session in your second page load event, if that session is valid then allow user to access second page, other wise redirect to first page again.

the same mechanism like we have checked user authentication, if user is not logged in then we redirect him to login page, or if logged in then can access other page. you can create same for your solution.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900