문제

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!

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top