Store the data in a custom class or DataSet. When the first page of
the wizard is hit, instantiate your class/DataSet and store it in the
user's session based on a random key (Guid works well). Pass the guid
along to each page via URL. On each page of the wizard, get this
class out based on the guid and store any changes. On the last page
send all the data to the database.
You could also store the data in the database at each step and then
have some way to differentiate completed vs abandoned questionnaires.
Again generate a unique key on first page and use this as the db
questionnaire key and pass along page to page. The advantage here is
you can get information on abandoned questionnaires later (i.e., does
everyone give up after 6 pages). Depending on the application, this
data could be very useful.
I've also seen people simply store this information in the session
without using any kind of URL key. This is bad as it assumes each
user is filling out one questionnaire--remember people can have
multiple browser windows or tabs. Ticketmaster does this and caused
me to get tickets to the wrong venue once when I opened two different
venues in different tabs. The above procedure will protect against
that (unless someone opens a new tab in the middle of the wizard).
HTH,
Sam
------------------------------------------------------------
We're hiring! B-Line Medical is seeking Mid/Sr. .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.
On Mon, 21 Aug 2006 11:47:02 -0700, VMI
<VM*@discussions.microsoft.comwrote:
>I'm working on a web application that's basically a questionaire that
consists of 8 pages. Each page has different data that needs to be saved. I
have to either save all the data from all 8 pages OR save nothing.
What's the best way to temporarily save this data and then insert (or
update) all this data in bulk at the end of the questionnaire?
Any help is appreciated.
Thanks.