Remembering entered information?

G

Guest

Hi there,

I have an .aspx page which I use to gather various pieces of information
from the user. One of the fields is a free text field for address or
optionally the user can type in a postcode (zip code) and a lookup is done
against an address database. I then redirect the user to another page, to
select their address. Now, once they have selected the address, how do I
redirect them back to the original page with the selected address and have
all the previously entered information back again. At the moment when I
redirect the user back to the original page, all the values are cleared.

How do I overcome this, do I have to store session variables for each field
and repopulate when I return? Or is their an easier way?

Cheers

Cammie
 
L

Lucas Tam

How do I overcome this, do I have to store session variables for each
field and repopulate when I return? Or is their an easier way?

You can store objects in session variables, so you could store an object
with multiple properties to store the values of all the fields.

You could use the query string to pass some of the items back and forth.

Pop up? Rather than redirect to a different page... maybe use a popup?

Also take a look at HTTPContext.Items - it allows you to pass variables
between pages during a Server.Transfer (but not a response.redirect).
 

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
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top