Here you're working with storing items in the page, so you could use something like viewstate to preserve the information across postbacks, or you could also save the data as name / value pairs in hidden fields (<input type="hidden" ...etc... />) Simply set the value property of the hidden form field to the variable with the data you want to retrieve on the next page.
On your other item, application logic has to be programmed. There's no two ways around it. Programming has come a long way, but if you want a computer to make decisions, you have to tell it how. What you'll want to do is maintain good abstractions. For example have a high level decision structure that determines if you need to send the user an email, ask a user more questions, get the user's mailing address, etc. (ie high level activities that have nothing to do with coding specifics, these are tasks you could execute in any programming language and in many ways) For each activity, call a new function that handles just that task.
Then start boring down into the specifics. So the function that emails someone might check to see if you have their email address; if you do, call a function that sends a form email. If not, call a function that displays a form requesting their email address (once you capture the email, you can call the function that sends the form email). The low level function to send the email will then handle all of the low level implementation involved in actually shooting that form mail out. You may have even lower level helper functions that encapsulate important functions you need to do over and over again and don't want to have write a hundred times.
__________________
-------------------------
Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe
When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper
Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
|