Accessing web page in sequence

N

niju

Hi there,
I have three web pages (A,B,C). I need to prevent users accessing page
B and C without accessing A. What would be the best way to achieve this
rule?


Many Thanks
Niju
 
R

Robbe Morris [C# MVP]

Depending on how critical accessing A before B and C is,
you could always check the server variable HTTP_REFERER
on all three pages and make sure it equals what you expected.

HTTP_REFERER can be spoofed if someone wanted to
go to the lengths of writing their own scripted browser sessions.

So, as long as you don't care/don't think someone would
bother with that, then I suspect this will do.

You could also utilize cookies to track which pages
they've been on and act accordingly.

--
2004 and 2005 Microsoft MVP C#
Robbe Morris
http://www.masterado.net

Earn $$$ money answering .NET Framework
messageboard posts at EggHeadCafe.com.
http://www.eggheadcafe.com/forums/merit.asp
 
B

Brock Allen

The more robust way would be to store state info in the database that knows
where the user is in these 3 steps. If they go to a step beyond where they
should be, redirect them back to where they should.

-Brock
DevelopMentor
http://staff.develop.com/ballen
 
G

Guest

If it is a simple scenario with only three web pages involved , the
easiest would be to set a Session Variable from page A and check it in B &
C.. Session("VisitedPageA") = "TRUE" or some thing..

Sreejith
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top