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?
PalahniukAsked:
Who is Participating?
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.