[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1444
  • Last Modified:

ReturnUrl returns only the first parameter of the querystring after login

Greetings
When calling my logon.aspx page I specify the ReturnUrl to be like
~/Admin/Logon.aspx?ReturnUrl=~/MyPage.aspx?param1=" + p1+ "&param2=" + p2
however after a successfull logon MyPage.aspx url contains only the first parameter and the second one dissapears!
I would expext the return url either to have all the parameters or none, but it returns only the first.
Any suggestion?
0
Palahniuk
Asked:
Palahniuk
2 Solutions
 
sm394Commented:
try wraping your params like

+server.urlencode( p2)
0
 
CCHP_GRPCommented:
The problem (I believe) is that if you are redirecting to a page that you are pulling from the querystring, it will truncate off the last ampersand.  For instance,

http://www.contoso.com?id=123&type=product&returnURL=http://www.jellybelly.com?param1=A¶m2=B

If you use Response.Redirect(Request.QueryString["returnURL"]), then it thinks that 'returnURL=http://www.jellybelly.com?param1=A' is the part of the querystring you want, and &param2=B is just another segment of the original url string.

Hope that helps,

Matt
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now