one of my .aspx pages is called using a URL like:
http://localhost/Test.aspx?returnUrl=http%3a%2f%2flocalhost%2fBackPage.aspx%3fmyParam%3dtest
But when I call Page.Request.Url.ToString() I get:
http://localhost/Test.aspx?returnUrl=http://localhost/BackPage.aspx?myParam=test
Why? How can I obtain the correct URL from the Url object?
TIA,
Axel Dahmen
TIA,
Axel Dahmen
"Axel Dahmen" <keent...@newsgroup.nospam> wrote in message
news:B19C17C9-879D-41E8...@microsoft.com...
I believe it's because the URL contains another full URL with QueryString
arguments and the URL parser may be getting confused because it sees = in
the 2nd query string....if you can modify the query string to use URLEncode,
that should help. (Encode the querystring before sending the request ... or
set the URLEncode'ed string for the link you are using....)
HTH,
Mythrna
The querystring of the URL is encoded using HttpUtility.UrlEncode. When
Uri.ToString() is called, internally it will decode the URL back to its
normal format. Yes it's by design behavior.
Regards,
Walter Wang (waw...@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.