Click to See Complete Forum and Search --> : ASP - user must click accpet to view site


deco10
08-20-2008, 07:01 AM
Hello,

I'm working on something which does not require a login, but requires the user to agree to certain terms before they can browse past the main page. When their session expires they would have to start at the main page and click accept again.

I know there is a better way that how I am doing it, but I'll tell you how I'm doing it anyway.



the "I accept" link looks something like this:
href="mysite.asp&a=Accept"

I have a variable in global.asa that is set to true the first time the page after the "accept" page has been agreed to.
<%
if session("firstLoad") = 0 then
session("firstLoad") = 1
session("x_a") = request.querystring("a")
end if

if session("x_a") <> "Accept" then
response.redirect ("http.....")
end if

%>

This works fine the first time. However once the session ends and the user opens the "accept" page again, they always get redirected. Restarting the browser fixes this but thats not really a solution I'm happy with.

Suggestions?


Thanks.

dc

pixelmonkey
08-26-2008, 12:50 PM
doing the same thing now for a site...

the only difference is the user first has a warning page they must agree with, then a terms of use page, they must also agree with, before seeing the login screen.

hope someone chimes in here with a suggestion.

- is there anything like a cookie being passed for the user session?
- does it continue to do this if the browser is closed and a new window is opened?
- users names/id from active directory? *only asking because it caused me a problem*

chris<pixelmonkey>:D