url decoding (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


seth -> url decoding (3/4/2002 1:18:44)

i'm confused about urlEncoded strings. I have a form that urlencoded the fields and values, into pairs and the string points to an asp page. On that asp page i have a simple script:
If a1 = 1 Then
response.redirect "...."
End If

al is a field name in the encoded sting and its value is either 0 or 1, by choice.

Is there something i need to do in the asp page in order to use the field name and value like this, cause when a1 field is selected so the value = 1, nothing happens when the string is direct at the asp page, the page is blank?






William Lee -> RE: url decoding (3/4/2002 1:53:02)

See if the values are passed to the page correctly. At the top of the asp page put this <%=Request("a1")%>

It should either print 0 or 1.

William Lee




seth -> RE: url decoding (3/4/2002 2:16:05)

yes i got a 1 value on the blank page
things seem to be looking up
would i have to use:
Request("value") for every field name?
...so...
If a1 = 1 Then
response.redirect "...."
End If
....would then be.....
If Request("a1") = 1 Then
response.redirect "...."
End If





William Lee -> RE: url decoding (3/4/2002 2:17:46)

quote:

yes i got a 1 value on the blank page
things seem to be looking up
would i have to use:
Request("value") for every field name?

 



Absolutely

Edited by - William Lee on 03/04/2002 02:19:36




seth -> RE: url decoding (3/4/2002 2:19:38)

thanks William!!





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625