Maintaining page state when navigating a wizard

Discussion in 'ASP .Net' started by Jesper Lauridsen, Nov 10, 2003.

  1. I am developing an ASP.NET application for a Questionnaire that spans
    over several pages.

    The entire Questionnaire code resides in one ASPX page. When a user
    submits a questionnaire page by clicking a "Next page" button, I want
    to 1) validate the answers and 2) render the next page (but still the
    same ASPX page) if the questionnaire page validates (wizard style).

    One design solution is to have a session variable hold the current
    page number. When the user presses the button he will be sent on the
    next page, eg. "intActivePage + 1".

    This works fine until the user presses the "Browser Back Button" since
    the Session Variable is uninformed about the History Navigation: There
    has been no round-trip to the server. And so, when the user presses
    the "Next page" button, he will jump two pages forward instead of one.

    Normally (in the old web-programming paradigme) I would hold the
    active page in the query-string, like eg.
    "localhost/questionnaire?page=2". Since the querystring is part of the
    URL, the "page" variable is automatically kept in sync with the acutal
    page that the user is viewing -- even if he presses the Back Button
    and re-submits the previous page.

    However, this does not seem to be compatible with ASP.NET programming
    paradigme. Has anyone had experience with this sort of thing. Is there
    a recommendable design pattern that I should know about.

    Thanks in advance

    ___________________ ___ _
    Jesper Lauridsen
    Technical e-Project Manager
    The Lundbeck Institute
    Tel.: +45 36 43 91 61
    Mob.: +45 40 25 35 51
     
    Jesper Lauridsen, Nov 10, 2003
    #1
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sergey Poberezovskiy

    Problems maintaining Session state

    Sergey Poberezovskiy, Nov 24, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    1,841
  2. Jason
    Replies:
    2
    Views:
    644
    Frank Oquendo
    Nov 29, 2003
  3. Greg Krzeszkowski
    Replies:
    3
    Views:
    752
    Peter Blum
    Mar 3, 2005
  4. Samy
    Replies:
    0
    Views:
    682
  5. Replies:
    0
    Views:
    774
  6. Sam
    Replies:
    4
    Views:
    681
  7. Andy B
    Replies:
    0
    Views:
    587
    Andy B
    Apr 19, 2008
  8. Thomas Fujita
    Replies:
    1
    Views:
    420
    Kenny
    Oct 22, 2003
Loading...