I am trying to encode parameters to be sent to a web service for processing. I start with a command with parameters such as:
TransportProviderConfirmation/68,Akal Singh,+972544944860,1234
I pass this string to a the encoding function:
template = HttpUtility.HtmlEncode(template);
The returned string is not changed in any way, despite the fact that there is a blank space which should be turned into %20, and a plus sign which should be turned into %2B. What is happening?
HtmlEncode? I think you're looking for UrlEncode().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With