Domanda

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!

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top