Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Response.Redirect and Request.QueryString -- Once Again


Message #1 by "Bengt" <asp@k...> on Thu, 18 May 2000 17:25:40
Thanks for all suggestions, but none of them did help. But I solved it in 

another way:



First I inserted:

<input type="hidden" name="ProdNr" value="<% response.write 

Request.QueryString("ProdNr") %>">



and then I changed my if-clause to:

if NOT isempty(Request.Form("Edit")) then

	Response.Redirect "red_produkt.asp?ProdNr=" & Request.Form("ProdNr")

end if



Why does it work with "Request.Form("ProdNr")" and not 

"Request.QueryString("ProdNr")"? Any suggestions?

Message #2 by =?iso-8859-1?Q?=C1rni_B=2E_Halld=F3rsson?= <abh@t...> on Thu, 18 May 2000 16:52:48 -0000
There two kinds of variables you can send to a page, querystring and

formdata. Querystring is attached to the end of the URL, like

www.simnet.is/default.asp?Name=Addi but formdata is the content of 

the

request.



Where you define the action of the form your sending like this, <form

action="default.asp?Name=Addi" method="post"> then you can use

Request.Querystring to get the name variable.



Arni Halldorsson

abh@t...







-----Original Message-----

From: Bengt 

Sent: 18. ma=ED 2000 17:26

To: ASP Databases

Subject: [asp_databases] Response.Redirect and Request.QueryString --

Once Again





Thanks for all suggestions, but none of them did help. But I solved it 

in another way:



First I inserted:

<input type="hidden" name="ProdNr" value="<% response.write Request.QueryString("ProdNr") %>">



and then I changed my if-clause to:

if NOT isempty(Request.Form("Edit")) then

	Response.Redirect "red_produkt.asp?ProdNr=" & Request.Form("ProdNr")

end if



Why does it work with "Request.Form("ProdNr")" and not0

"Request.QueryString("ProdNr")"? Any suggestions?

Message #3 by "werner teunissen" <werner@t...> on Thu, 18 May 2000 19:16:14 +0200
I thought the method for getting the data out of a querystring was something

you'd do with "method="get".??





----- Original Message -----

From: "Árni B. Halldórsson"

To: "ASP Databases" <asp_databases@p...>

Sent: Thursday, May 18, 2000 6:52 PM

Subject: [asp_databases] RE: Response.Redirect and Request.QueryString --

Once Again





There two kinds of variables you can send to a page, querystring and

formdata. Querystring is attached to the end of the URL, like

www.simnet.is/default.asp?Name­di but formdata is the content of the

request.



Where you define the action of the form your sending like this, <form

action="default.asp?Name=Addi" method="post"> then you can use

Request.Querystring to get the name variable.



Arni Halldorsson

abh@t...







-----Original Message-----

From: Bengt

Sent: 18. maí 2000 17:26

To: ASP Databases

Subject: [asp_databases] Response.Redirect and Request.QueryString --

Once Again





Thanks for all suggestions, but none of them did help. But I solved it

in another way:



First I inserted:

<input type="hidden" name="ProdNr" value="<% response.write

Request.QueryString("ProdNr") %>">



and then I changed my if-clause to:

if NOT isempty(Request.Form("Edit")) then

Response.Redirect "red_produkt.asp?ProdNr=" & Request.Form("ProdNr")

end if



Why does it work with "Request.Form("ProdNr")" and not0

"Request.QueryString("ProdNr")"? Any suggestions?

Message #4 by "Ken Schaefer" <ken.s@a...> on Fri, 19 May 2000 11:04:32 +1000



> I thought the method for getting the data out of a querystring was

something

> you'd do with "method="get".??



<form method="get"> will append the data in variable/value pairs to the URL

in the same way as if you had done:



<a href="somepage.asp?var1=value1&var2=value2">



Cheers

Ken





Message #5 by =?iso-8859-1?Q?=C1rni_B=2E_Halld=F3rsson?= <abh@t...> on Fri, 19 May 2000 10:56:23 -0000
If you set the method to "get" then can't use "post" method as well :) 

My

examples uses both querystring and formdata to pass data between pages.



Arni B. Halldorsson

  abh@t...



-----Original Message-----

From: werner teunissen 

Sent: 18. ma=ED 2000 17:16

To: ASP Databases

Subject: [asp_databases] RE: Response.Redirect and Request.QueryString

-- Once Again





I thought the method for getting the data out of a querystring was 

something

you'd do with "method=3D"get".??





----- Original Message -----

From: "=C1rni B. Halld=F3rsson"

To: "ASP Databases" <asp_databases@p...>

Sent: Thursday, May 18, 2000 6:52 PM

Subject: [asp_databases] RE: Response.Redirect and Request.QueryString 

--

Once Again





There two kinds of variables you can send to a page, querystring and

formdata. Querystring is attached to the end of the URL, like

www.simnet.is/default.asp?Name=ADdi but formdata is the content of the

request.



Where you define the action of the form your sending like this, <form

action=3D"default.asp?Name=3DAddi" method=3D"post"> then you can use

Request.Querystring to get the name variable.



Arni Halldorsson

abh@t...







-----Original Message-----

From: Bengt

Sent: 18. ma=ED 2000 17:26

To: ASP Databases

Subject: [asp_databases] Response.Redirect and Request.QueryString --

Once Again





Thanks for all suggestions, but none of them did help. But I solved it

in another way:



First I inserted:

<input type=3D"hidden" name=3D"ProdNr" value=3D"<% response.write

Request.QueryString("ProdNr") %>">



and then I changed my if-clause to:

if NOT isempty(Request.Form("Edit")) then

Response.Redirect "red_produkt.asp?ProdNr=3D" & Request.Form("ProdNr")

end if



Why does it work with "Request.Form("ProdNr")" and not0

"Request.QueryString("ProdNr")"? Any suggestions?

Message #6 by "Ken Schaefer" <ken.s@a...> on Fri, 19 May 2000 23:30:44 +1000
> If you set the method to "get" then can't use "post" method as well :) My

> examples uses both querystring and formdata to pass data between pages.



yes you can...



<form method="post" action="page2.asp?var1=value1">

<input type="hidden" name="var2" value="value2">

</form>



on page2.



Response.Write(Request.QueryString("var1") & "<br>")

Response.Write(Request.Form("var2"))



Cheers

Ken






  Return to Index