Classic ASP question

D

daforga

This question relates to classic ASP. I would like to call a page via
Response.Redirect and have the values passed in the querystring appear in
input fields of the second page.
Page one would have a command:
Response.Redirect("page2.asp?Keepname1" + ("Value1") +"&KeepName2"
+("Value2"))
When Page2 is diplayed I would like to see the values passed in the
querystring appear in
input fields of the target page.
If this Is this possible, can an example be given?
Thanks
 
B

Bob Barrows

daforga said:
This question relates to classic ASP. I would like to call a page via
Response.Redirect and have the values passed in the querystring
appear in input fields of the second page.
Page one would have a command:
Response.Redirect("page2.asp?Keepname1" + ("Value1") +"&KeepName2"
+("Value2"))
When Page2 is diplayed I would like to see the values passed in the
querystring appear in
input fields of the target page.
If this Is this possible, can an example be given?
Thanks
Have you tried it? Should be easy enough to whip up a test in a few minutes
....

This may interest you:
http://www.aspfaq.com/show.asp?id=2030
and this:
http://www.aspfaq.com/show.asp?id=2006
 
P

p byers

daforga said:
This question relates to classic ASP. I would like to call a page via
Response.Redirect and have the values passed in the querystring appear in
input fields of the second page.
Page one would have a command:
Response.Redirect("page2.asp?Keepname1" + ("Value1") +"&KeepName2"
+("Value2"))
When Page2 is diplayed I would like to see the values passed in the
querystring appear in
input fields of the target page.
If this Is this possible, can an example be given?
ThanksIn VBScript,

In VBScript, Concatination is done with "&" not with "+"
In JavaScript, Concatination is done with "+"

Pete (Northolt UK)
 
E

Evertjan.

p byers wrote on 10 feb 2009 in microsoft.public.inetserver.asp.general:
In VBScript, Concatination is done with "&" not with "+"
In JavaScript, Concatination is done with "+"

and in VBS, do not use the outer () and other () and do not forget the =


Response.Redirect "page2.asp?Keepn1=" & Value1 & "KeepN2=" & Value2

That is about the asp-vbs in Page2:

<input
name = 'Keepn1'

<input
name = 'Keepn2'

Indeed that was a classic classic asp Q
in the sense that it was answered time and again in this NG.
 
D

Daniel Crichton

daforga wrote on Mon, 9 Feb 2009 16:16:01 -0800:
This question relates to classic ASP. I would like to call a page via
Response.Redirect and have the values passed in the querystring appear
in input fields of the second page.
Page one would have a command:
Response.Redirect("page2.asp?Keepname1" + ("Value1") +"&KeepName2"
+("Value2"))
When Page2 is diplayed I would like to see the values passed in the
querystring appear in input fields of the target page.
If this Is this possible, can an example be given?
Thanks


Response.Redirect "page2.asp?Keepname1=" & "Value1" & "&KeepName2=" &
"Value2"

You forgot the = between the name and value in each pair, as well as the +
being wrong as had previously been pointed out to you. And if Value1 and
Value2 are variables rather than constant strings then you would do this:

Response.Redirect "page2.asp?Keepname1=" & Server.URLEncode(Value1) &
"&KeepName2=" & Server.URLEncode(Value2)

and to be safe, just in case your names need recoding for URL handling (such
as having a space, ampersand, equals, or other character that would cause
the URL to be interpreted incorrectly, you would use something like:

Response.Redirect "page2.asp?" & Server.URLEncode(Keepname1) & "=" &
Server.URLEncode(Value1) & "&" & Server.URLEncode(KeepName2) & "=" &
Server.URLEncode(Value2)
 

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,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top