How to enforce a specific sequence of pages access?

How to enforce a specific sequence of pages access?

am 01.04.2008 18:33:58 von bogdan

Hi,

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
instead?

Thanks,
Bogdan

Re: How to enforce a specific sequence of pages access?

am 01.04.2008 21:10:12 von NoSpamMgbworld

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:

http://mysite.com/secret/1
http://mysite.com/secret/2
http://mysite.com/secret/3

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
"bogdan" wrote in message
news:uApFzYBlIHA.5160@TK2MSFTNGP05.phx.gbl...
> Hi,
>
> 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 instead?
>
> Thanks,
> Bogdan
>
>
>
>