Server.Transfer and passing values

D

Dr. Know

When using the Response.Redirect in test1.asp in this manner:

Response.Redirect ("test2.asp?err=something&msg=somethingelse")

You can pass values calculated in test1.asp to test2.asp.
But this is a round trip redirect - and also shows passed values in
the address bar.

But when using Server.Transfer, as in:

Server.Transfer ("test2.asp?err=something&msg=somethingelse")

This is apparently not allowed, as I get an error claiming that
non-relative references in the path of the file are not allowed.

My question is:

*Without* using application or session stores, how can you pass values
between pages called in this manner - values that are not a part of
the originally submitted information?

Thanks,

Greg











Dr. Know
 
E

Evertjan.

Dr. Know wrote on 25 jan 2005 in microsoft.public.inetserver.asp.general:
But when using Server.Transfer, as in:

Server.Transfer ("test2.asp?err=something&msg=somethingelse")

This is apparently not allowed, as I get an error claiming that
non-relative references in the path of the file are not allowed.

My question is:

*Without* using application or session stores, how can you pass values
between pages called in this manner - values that are not a part of
the originally submitted information?

---------test.asp

<%
a = 3
%>
<!-- #include virtual ="test2.asp"-->


---------test2.asp

<%
response.write a
%>
 
D

Dr. Know

Evertjan. said:
Dr. Know wrote on 25 jan 2005 in microsoft.public.inetserver.asp.general:
---------test.asp
<%
a = 3
%>
<!-- #include virtual ="test2.asp"-->

---------test2.asp
<%
response.write a
%>

Yes, this works - and I have to admit, I hadn't tried it.
I made minor modifications to both scripts - and it does work.

But...
The reason I hadn't tried it was a concern that if you had 3 or 4
possible files to refer to, that the overhead of loading all of the
..inc files would deaden response time, as they are ALL loaded before
the script runs

Say the ASP page is a form...
The user fills out the form and posts it...
The ASP page decides which of 4 pages to refer the user to...

Using the .INC method, all four pages are loaded before the script
executes, but only the appropriate text is output back to the user.

Using the referrer method, the client just gets directed to another
form.

Which is more efficient - Time and CPU-utilization wise?
Or would it simply depend on the individual app. in question?


Thanks,
Greg







Dr. Know
 

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

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,132
Latest member
TeresaWcq1
Top