472,989 Members | 2,959 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,989 software developers and data experts.

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 1669
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ron_Adam | last post by:
Hi, Sometimes it just helps to see what's going on, so I've been trying to write a tool to examine what names are pointing to what objects in the current scope. This still has some glitches,...
2
by: Graham Mattingley | last post by:
How to I test a varable to see if it contains a number and not a text value ?? I want to use this to detect if people have edited my get strings in the URL field of the browser, before it gets...
0
by: Andy | last post by:
Hi All. I'm working for a company that has set out a guideline for retrieving data from a database. Nobody can explain to me the reason for the following. When retrieving a set of records...
2
by: Sakke | last post by:
Hello! We have written a GCryptoSvr.dll COM server in C++. Inside that resides WebClient COM component. WebClient CLSID is {8DC27D48-F94C-434B-A509-C3E1A3E75B9E}. When we are using that...
1
by: Gary | last post by:
Open the web browser at the same time, the session varable in the second broswer is disappeared. All The Session Varable is declared in the webform page load.
1
by: jimmyfo | last post by:
Hi, I recently wrote an ASP.Net web application in VS2005 and published (using VS2005 Publish feature) it to a relatively clean machine with ASP.Net 2.0 and MDAC 2.8 installed on it. However, when...
2
by: Suresh Kumar Rathod | last post by:
HI friends... Can any body give reason / logic behind static varable lifetime through out the process execution. i.e how does compiler maintains the static varable life through out the process...
5
by: Sanjay Pais | last post by:
I have a table with over 1.3 million rows. I am retrieving only 20 at a time using the with - over clauses In query analyser, the data is retrieved in under a second. When retrieving using the...
0
by: forgedascendant | last post by:
Hello All, I am kinda new to VBA interacting with excel...or just VBA for that matter. I was wondering if there was a was to determine if a ranged varable (lets say ProductXRange) is empty? ...
4
by: shirleylouis | last post by:
Hi Ppl, Could anyone help me out with retrieving URL from Clipboard using C#??
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.