Unable Response.Redirect(url); with many query arguments

Go To StackoverFlow.com


The '&' that separates query string arguments is getting encoded no mater what I do.

// sitecore ASP.NET server side ascx code...
string url = string.Format("http://other-domain.com/?a={0}&b={1}", "1", "2");
// ...

gives my browser the address:


which is not what I want, I simply want:


Is it Response.Redirect() that is HTMLencoding my '&'?

And how do I get it to leave that separator alone?

2012-04-03 22:27
by Nate-
Covers the same ground as http://stackoverflow.com/questions/561954/asp-net-urlencode-ampersand-for-use-in-query-string - look at Server.UrlEncod - dash 2012-04-03 22:50


I am certain of one thing: this is not caused by Response.Redirect() or any of the other code that you posted.

There is probably something else wrong in the actual code.

2012-04-04 07:27
by Ruud van Falier
Thanks, and you are right, My problem was an editor that was htmlEncoding to the file, but showing me the '&' on screen (i.e. sitecore's developer center editor) - Nate- 2012-04-04 13:26