Please advise ...

Results 1 to 4 of 4

Thread: Please advise ...

  1. #1
    Fion Guest

    Default Please advise ...

    I have a form on "purchase.asp"<BR>After it is submitted, using a button, it is redirected to a confirm page "confirm.asp" where I retrieve values using Request.form of textfields in "purchase.asp" and display them on this page. I need to have two buttons one called "Yes" to insert these values and "No" to go back to "purchase.asp".<BR><BR>I tried to use a submit button for this "Yes" button but when I try to insert, there are empty values although I managed to display them on this page ("confirm.asp"). I know it because I did a response.write on the sql statement.<BR><BR>1)What happened to my values, why did it appear to be empty?<BR>2)Is there a better way to do this?<BR>3)How do I make sure that the entries I captured in "purchase.asp" are still in their respective fields when I click "No" to go back?

  2. #2
    Join Date
    Dec 1969

    Default RE: Please advise ...

    the request object scope is for that page only. as soon as you redirect it to new page that request object will die and a new oe will be available with the current form values.<BR>so you can solve this problem using dictionary object.<BR>ie while showing the confirm.asp just store all form values from purchase.asp in a dictionary object and store it in session.when user presses "yes" in confirm.asp you can use that dictionary object from session otherwise destroy it<BR>hope this helps

  3. #3
    Larrie Guest

    Default RE: Please advise ...

    Storing a dictionary object in the Session variables is not very scalable. The best way is to reproduce exactly the same fields in confirm.asp form, as they appear in the purchase.asp form, but change their type to HIDDEN. This means they will no be displayed in the browser but will be available to the calling asp, whether it be confirm.asp again or purchase.asp.

  4. #4
    Join Date
    Dec 1969

    Default Example:

    &#060;form method="post" action="something.asp"&#062;<BR><BR>&#060;input type="hidden" name="fieldname" value="fieldvalue"&#062;<BR><BR>&#060;/form&#062;<BR><BR>if you need to use the values later on, you session instead. If it is just confirmation, hidden is better.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts