Question

Hi this is my first time trying to do this and I dont know where to start. I'm trying to make simple Yes or No age verification to my .aspx page which includes sub-pages. I want it to be so, that you need to press Yes before you can continue to subpages and if you try to type it like http://www.page.com/ageverification/subpage.aspx you are automatically redirected to ageverification page. Any examples are welcome cause I'm new in to this. Thank you for your time!

Was it helpful?

Solution

One simple way would be to store if the age is verified in the Session.

In the Page_Load of your subpage.asxp just check if the Session if age is verified. If yes, then let it load else just redirect back to age verification page.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top