Response.Redirect passes only one parameter (Full Version)

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



Message


freeman24147 -> Response.Redirect passes only one parameter (2/27/2008 2:36:57)

I've modified the Response.Redirect from the Frontpage Edit page to pass a new parameter string for the login.asa:

<%
If Session(SiteID) <> true Then
Response.Redirect("accomplishments/editor/Login.asp?requester=http://www.evaguru.com/pmpro/accomplishments/accomp_edit.asp?proj=" & Request("Proj") & "&k=" & Request("k"))
End If
%>


Problem is that it's not passing the second parameter, anything after Request(Proj). when I do a Response.Write, all I get is:
http://www.evaguru.com/pmpro/accomplishments/accomp_edit.asp?proj=1001

I don't even get a blank space for the &. I doesn't even pick up the "k=" string. Do you know why it's not picking up the values after the first request? I use this double request all throughout my site, and every thing else works fine. I guess I should just use Spooky's login anyway, right? But now I really want to know.

Thanks in advance





Spooky -> RE: Response.Redirect passes only one parameter (2/28/2008 1:03:29)

The problem is you are passing 2 querystrings - one which is requester, however the requester is a querystring itself!
So you actually have 3 parameters:

proj, requester and K
One way would be to split them into the 3 unique parts because the extra "?" will confuse the parser




freeman24147 -> RE: Response.Redirect passes only one parameter (2/29/2008 2:21:24)

Spooky,
After more experimenting, it turns out the "&" is causing the problem. I even tried:
Response.Redirect("accomplishments/editor/Login.asp?requester=http://www.evaguru.com/pmpro/accomplishments/accomp_edit.asp?proj=" & Request("Proj") & "k=" & Request("k"))

It returns: http://www.evaguru.com/pmpro/accomplishments/accomp_edit.asp?proj=1001k=43

But as soon as I add the & between the Proj and K: Request("Proj") & "&k=" & Request("k")) it terminates the string at the Proj variable. I tried using Ascii, but that starts off with an &, so that's a no-go. What am I doing wrong?




freeman24147 -> RE: Response.Redirect passes only one parameter (3/6/2008 2:30:10)

Spooky,
Now this is interesting. I think I undersatand your reply to break all three part out, so I created this new string:

Response.Redirect("accomplishments/editor/Login.asp?requester=http://www.evaguru.com/pmpro/accomplishments/accomp_edit.asp" & "?proj=" & Request("Proj") & "&k=" & Request("k"))

When I go through the login process, I added a response.write to the login page so I could see what my Requester string looks like, and it says this:

http://www.evaguru.com/pmpro/accomplishments/accomp_edit.asp?proj=1001

Same thing as before. I even took the ? out altogether, and I had the same string. It's not picking up anything past the & after Request("Proj"). But when I look at the string that in the URL address bar, it shows all parameters:

http://www.evaguru.com/pmpro/accomplishments/accomplishments/editor/Login.asp?requester=http://www.evaguru.com/pmpro/accomplishments/accomp_edit.asp?proj=1001&k=43
Why would it say that in the address bar, but not the response.write. Is there something in Requester that's broken?

Thanks




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875