0

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");
Response.Redirect(url);
// ...

gives my browser the address:

http://other-domain.com/?a=1&b=2

which is not what I want, I simply want:

http://other-domain.com/?a=1&b=2

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

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

Nate-
  • 157
  • 1
  • 9
  • Covers the same ground as http://stackoverflow.com/questions/561954/asp-net-urlencode-ampersand-for-use-in-query-string - look at Server.UrlEncode – dash Apr 03 '12 at 22:50

1 Answers1

0

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.

Ruud van Falier
  • 8,765
  • 5
  • 30
  • 59
  • 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- Apr 04 '12 at 13:26