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. Advertising

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. Greg Krzeszkowski
    Replies:
    3
    Views:
    613
    Peter Blum
    Mar 3, 2005
  2. Samy
    Replies:
    0
    Views:
    550
  3. Replies:
    0
    Views:
    640
  4. Sam
    Replies:
    4
    Views:
    572
  5. Andy B
    Replies:
    0
    Views:
    465
    Andy B
    Apr 19, 2008
Loading...

Share This Page