How to enforce a specific sequence of pages access?




I'd like to make sure that users access pages in a specific sequence. For
example, if a site consists of 3 pages, I'd like users to access first
Page1.aspx, then Page2.aspx, and then Page3.aspx. But they should be able
to go back in a 'random access' mode and be able to access Page1 from Page2,
Page2 from Page3, and Page1 from Page3.

What is the best way to enforce it? How do I prevent a user from displaying
Page2 without first visiting Page1 (which has a link to Page2)? For
example, a user can set a bookmark on Page2.aspx and then at a later time
might try to access it directly. How do I force him/her to go to Page1.aspx




Cowboy \(Gregory A. Beamer\)

Instead of "pages", consider using a tabbed type of dialog. You do not have
to use actual links that look like tabs, maybe a 1-2-3 type of link. You
then store what the user has seen ( perhaps in session? persisted if you
need it to last longer) and allow him to go through any he has in his list.

If you want it to appear like separate pages, you can have three ASPX pages
inherit from the same base class and have the base class work the logic.

Another way to accomplish this is URL mapping. WIth MVC (still in beta,
although Go Live), you have complete control over this, as well, as the URL
is mapped to a controller which determines the view to show. You can set up
the URL to be something like:

Gregory A. Beamer

Subscribe to my blog

or just read it:

| Think outside the box!

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