Store temporary data?

J

James T.

Hello!

I am developing a travel agency web site. Now I am bit stuck and need some
advice.

I created a 4 step wizard page to add new vacation package to the database.
On the 3rd step there is a form where user can add one or more Hotels.
Hotels table contains information about hotels related with this package.

It works fine if there is only one Hotel, but if there are more than one
Hotel then I must to store each Hotel before sending to database once all
steps are completed.

There are two options in my mind... I was wondering which is the best way?
Or is there any alternatives?

- Created a custom collection of DataRows and store it in the SessionState
- Create a new temporary table and store it in the SessionState

The most IMPORTANT thing is to keep it easy to manage, because user should
be also able to edit and delete Hotel before final submission, in case
something went wrong or product was created by mistake.

All comments are welcome...

Tkanks!
James
 
E

Eliyahu Goldin

James,

A good idea is to store all your wizard data in a dataset with appropriate
tables. There will be one for hotels. You can store the dataset in the
session and save it to the database on submit click.

Eliyahu
 
G

Guest

- Created a custom collection of DataRows and store it in the
SessionState - Create a new temporary table and store it in the
SessionState

The most IMPORTANT thing is to keep it easy to manage, because user
should be also able to edit and delete Hotel before final submission,
in case something went wrong or product was created by mistake.

I would create a custom collection object - save it to a session variable.

When you decide to "save" the data, loop through the collection and insert
the records into the database.

A collection is lighter weight than a dataset, and it's easier to add
records to a collection than a dataset.
 

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,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top