View Single Post
  #6 (permalink)  
Old November 19th, 2003, 07:36 PM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Well, if you want to do that, you'll need some way to save state. The Web is stateless by design. this means that as soon as you have requested a page and received the response, the Web server forgets about you.

For static pages, this is not a problem but it is for pages containing forms and other data.

To save state (the information from the page, in your case), you have a couple of options:

1. Use hidden form fields.
Simply append each new value as a hidden form field

2. Use Cookies
Add your form values to the Cookies collection

3. Use a database
You can store each submitted form in the database. Hoop up a User ID to the database record, so you can see what user submitted what data.

4. Use a text file
Same as the database, but uses a text file instead (only applicable for small sites)

5. Use sessions
You can use ASP Session to store information. This solution doesn't scale well (you can't use it in a web farm (multiple Web servers), so it mostly appropriate for small to medium sized Internet and Intranet sites.

What exactly are you trying to accomplish? Can you elaborate a bit about your current ideas. Not every solution is applicable in every scenario.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote