 |
| ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

November 17th, 2003, 11:35 PM
|
|
Registered User
|
|
Join Date: Nov 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
help! asp form
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.
|
|

November 18th, 2003, 06:42 PM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
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.
|
|

November 18th, 2003, 07:08 PM
|
|
Registered User
|
|
Join Date: Nov 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
|

November 18th, 2003, 07:41 PM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
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.
|
|

November 18th, 2003, 08:54 PM
|
|
Registered User
|
|
Join Date: Nov 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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???
|
|

November 19th, 2003, 10:48 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
Session values persist between page hits, so you don't need to update them unless they change.
Peter
------------------------------------------------------
Work smarter, not harder.
|
|
 |