ReturnUrl returns only the first parameter of the querystring after login

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?
Who is Participating?
try wraping your params like

+server.urlencode( p2)
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,¶m2=B

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

Hope that helps,

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.