Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / April 2008

Tip: Looking for answers? Try searching our database.

How to enforce a specific sequence of pages access?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bogdan - 01 Apr 2008 17:33 GMT
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
Cowboy (Gregory A. Beamer) - 01 Apr 2008 20:10 GMT
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

Signature

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!

*************************************************
> Hi,
>
[quoted text clipped - 12 lines]
> Thanks,
> Bogdan

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.