Maintaining page state when navigating a wizard

J

Jesper Lauridsen

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
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top