Wrox Programmer Forums
|
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
 
Old February 16th, 2005, 03:16 PM
Registered User
 
Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default passing variables

Hi --

I'm trying to do something that I believe should be simple to do, yet it is giving me great difficulty.

I have a form that collects data from the user, dumps the information into an online database (salesforce.com) and then redirects to a confirmation page, informing the user their info has been received.

I would like for the user to be able to see that information on the re-direct page, as to confirm that the information has actually been deposited and they in fact are registered.

In the Form tag on the input page ACTION="thanksregistration.asp", which is the re-direct page. Input Type = "Text" and Name = "Contact_FirstName (for example)

I am trying to pass the input info onto the re-direct page. I have
declared a variable in the following manner:

<%
Dim strFirstName
strFirstName = Request.Form("Contact_FirstName")
Response.Write(" We Have you registered as :" )
Response.Write (strFirstName)
%>

As yopu can guess the variable is not being passed through, although the text, We Have you registered as: is being written.

What am I doing wrong?

Thanks very much for your help in advance.

Jack Levin
Web Master
Demantra, Inc.
 
Old February 16th, 2005, 03:45 PM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Which method are u using in <form> Tag? Get or Post..

Om Prakash
 
Old February 16th, 2005, 04:00 PM
Registered User
 
Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Post

Jack Levin
Web Master
Demantra, Inc.
 
Old February 17th, 2005, 08:02 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

You say that you dump the information into a database and then redirect to a confirmation page?

I would guess that the data is being lost on the redirect - standard HTTP redirects don't preserve POST'ed data, you need to pass that info on somehow, some ways you could do this are:
cookies
querystring
asp session
do away with the redirect by combining the db dump and confirmation pages into one, either by direct #include or maybe by Server.Transfer / .Execute

hth
Phil
 
Old February 17th, 2005, 11:23 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

If you don't want to user querystring ?
Another way is to create a form on the second page ,and at the end of the page just post that form and retrieve the value in the resulting page again.

Cheers :)

vinod
 
Old February 17th, 2005, 11:43 AM
Registered User
 
Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks

Jack Levin
Web Master
Demantra, Inc.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing Variables silve1999 Pro Java 1 June 15th, 2006 12:54 PM
Passing Variables CMOS Classic ASP Basics 2 January 22nd, 2006 07:38 PM
Passing variables karlirvin PHP How-To 4 December 2nd, 2005 08:02 PM
Passing variables acko ASP.NET 1.x and 2.0 Application Design 1 December 23rd, 2003 09:40 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.