Retrieving Varable from ASP to ASP.

B

BOBss

I have an .ASP page that comes up, and I am trying retrieve a variable from
the previous .ASP page. However none of the variables from the previous .ASP
page are available to the current .ASP page. There are three pages in this
chain.

1. NewUser.html
Information is input in this page, and posted to the next page using this
tag <form method="post" action="newUser_response.asp">.

2. NewUser_response.asp
Information is retrieved from the previous page using the
<%=request.form("strADLocation") %> tag, and then posted to the next page
using the <form method="post" action="newUser.asp"> This page is basically
just a confirmation page, and just displays the information from the
previous page, and sends it to the next page.

3. NewUser.asp
This page is supposed to retrieve all of the variables from the previous
..asp page using this syntax strADLocation = request.form("strADLocation"),
and create a user account, but none of the variables are available to the
script portion of this page from the previous .asp page

I had a similar problem when I was trying to make variables available to a
..asp page from a .html page, and later found out that I had to re-declare
the variables in the second page which was an .asp page using this syntax
strADLocation = request.form("strADLocation"). Everything worked great at
this point(HTML to .ASP). The problem I am having is that I added an
additional .ASP page(NewUser_response.asp) in the middle, and I can't seem
to retrieve the variables from the previous .asp page. Now the chain is HTML
to .ASP to .ASP. If


My question is: You should be able retrieve variables from an .ASP page to
an .ASP page. RIGHT?

If so can someone point me to some sample code?



Thanks in advance!
 
B

Bob Barrows [MVP]

BOBss said:
I have an .ASP page that comes up, and I am trying retrieve a
variable from the previous .ASP page. However none of the variables
from the previous .ASP page are available to the current .ASP page.
There are three pages in this chain.

I can't add anything to what I posted in the vbscript group. Just so
everyone is on the same page, here is my reply so people don't have to
go search for it:
The only ways to pass data from one page to another are by:

1. POST (Form variables)
2. GET (querystring variables)
3. Cookies
4. Session variables
5. Application variables
6. Custom state maintenance mechanism - i.e., store the values in a
database or in the server file system

You need to read up on the ASP script objects. See:
http://msdn.microsoft.com/library/en-us/iissdk/html/2c40c3cf-90eb-41ca-ae2a-0ef33a651779.asp


Let's keep the conversation in a single place, shall we? This group is
the more relevant one so let's do it here.
 
T

Tim Slattery

BOBss said:
I have an .ASP page that comes up, and I am trying retrieve a variable from
the previous .ASP page. However none of the variables from the previous .ASP
page are available to the current .ASP page. There are three pages in this
chain.

When you receive data in one of your pages, store it in the Session
object. Then it will be available when and wherever you need it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,227
Latest member
Daniella65

Latest Threads

Top