|
Subject:
|
help! asp form
|
|
Posted By:
|
artistic_perplexity
|
Post Date:
|
11/17/2003 10:35:26 PM
|
Hey, i have this assignment to do, and I can do parts of it, but i was wondering if anyone could help me:
1. Give the user a list of items to purchase with a price displayed. Include these in 3 categories with 3 items in each category (you choose the types of products). Make the lists out of radio buttons so the user can only choose one item in each category. Hint: Use radio buttons with field names corresponding to the type of item they are choosing and have their values equal the display name of the product. 2. Once they have selected some items and have submitted, display a confirmation page showing their choices. Ask the person if the choices are correct. If the are, proceed to step 4 below. If not, let them go back to the first page and choose their items again. Once they are done, store the items they have chosen as session variables. Hint: Display only the summary, but store the values of the form fields as hidden fields. 3. If the person chooses to go back and re-select their items, re-populate the radio buttons with their previous choices. 4. Once they confirm their choices, let them enter their personal information to complete the purchase. Trim all the user input for extra blank spaces and convert to uppercase. 5. Provide a summary page of the information they entered and the items they choose. Display the product choices from the values of the session variables. After you have displayed the summary clear all their session variables.
I can get the first part, but that's it.. any help would be appreciated... thanks.
|
|
Reply By:
|
planoie
|
Reply Date:
|
11/18/2003 5:42:29 PM
|
I doubt anyone's going to do your homework for you, but we'd gladly help if you are stumped by a particular bit of code. Is there something in particular you are having difficulties with?
Peter ------------------------------------------------------ Work smarter, not harder.
|
|
Reply By:
|
artistic_perplexity
|
Reply Date:
|
11/18/2003 6:08:50 PM
|
no, it's part of an even bigger assigment.. the main part that is confusing is the part that the user goes back to the main page choose their items again, and their choices will still be there.
|
|
Reply By:
|
planoie
|
Reply Date:
|
11/18/2003 6:41:26 PM
|
You need to link the user back to the first page with all the values that they chose. This can be done by either 1. tacking them onto the querystring of the url (somepage.asp?somevalue=1&anothervalue=2) and then be getting them with Request.QueryString("somevalue") etc. 2. Saving the values into the session (Session("somevalue") = x) and getting them with x = Session("somevalue")
In either case, you'll need to prefill the form elements with what you got.
Peter ------------------------------------------------------ Work smarter, not harder.
|
|
Reply By:
|
artistic_perplexity
|
Reply Date:
|
11/18/2003 7:54:48 PM
|
ok, thanks... i think i was in that direction, but couldn't quite get it.. I have the thing almost done.. the only other problem i'm having is I have the results displayed on one page.. but when i try and call them, they don't work on another page.. I think I have to store the session or whatever again after i've used it once or something???
|
|
Reply By:
|
planoie
|
Reply Date:
|
11/19/2003 9:48:58 AM
|
Session values persist between page hits, so you don't need to update them unless they change.
Peter ------------------------------------------------------ Work smarter, not harder.
|