468,306 Members | 1,174 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,306 developers. It's quick & easy.

Retrieving Varable from ASP to ASP.

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!
Jun 5 '07 #1
3 1546
BOBss wrote:
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...f33a651779.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.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jun 5 '07 #2
"BOBss" <Bo***@123.comwrote:
>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.

--
Tim Slattery
MS MVP(DTS)
Sl********@bls.gov
http://members.cox.net/slatteryt
Jun 5 '07 #3
BOBss wrote:
My question is: You should be able retrieve variables from an .ASP
page to an .ASP page. RIGHT?
Wrong. Requests are stateless.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Jun 6 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Ron_Adam | last post: by
2 posts views Thread by Graham Mattingley | last post: by
1 post views Thread by jimmyfo | last post: by
5 posts views Thread by Sanjay Pais | last post: by
4 posts views Thread by shirleylouis | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.