1

I have the following code as part of a System.Windows.Forms.Form using a WebBrowser control in C#:

byte[] parameterbyte = Encoding.UTF8.GetBytes(webPost.PostData);

browser.Navigate(new Uri(webPost.Url), String.Empty, parameterbyte, string.Format("Content-Type: {0}", webPost.ContentType) + ";charset=utf-8");

In the webPost.PostData, I have some value like:

MRz2DG0xlu0ucbwzOLXFDoKrmHRFxdi1x6sAU5+E+RcQrjqzGBP1zfBr8XvhoG9YrSd8NwY

However, when browser.Navigate is executeed, in Fiddler I see the + sign was replace by space. Everything else is fine. I tried all different encodings and values, but cannot resolve the issue. Does anyone has a clue?

Lloyd
  • 29,197
  • 4
  • 84
  • 98
  • Possibly related: [application/x-www-form-urlencoded](http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1). Spaces and the plus sign do have a relation. – Brian S Jan 10 '14 at 16:58
  • This might help: http://stackoverflow.com/questions/1373414/ajax-post-and-plus-sign-how-to-encode – Brandon Jan 10 '14 at 18:05

0 Answers0