Retrieving Varable from ASP to ASP.

Retrieving Varable from ASP to ASP.

am 05.06.2007 17:19:37 von 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

.

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 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!

Re: Retrieving Varable from ASP to ASP.

am 05.06.2007 18:05:26 von reb01501

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-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.
--
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.

Re: Retrieving Varable from ASP to ASP.

am 05.06.2007 22:04:36 von Tim Slattery

"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.

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)
Slattery_T@bls.gov
http://members.cox.net/slatteryt

Re: Retrieving Varable from ASP to ASP.

am 07.06.2007 00:11:58 von Dave Anderson

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.