Get plus(+) operator from C# controller as string

Viewed 41

I need to send a plus(+) operator as string from typescript service to C# Controller. When I debug it, typescript sends as "+", but in C# Controller, the parameter comes as null. The equal sign or negative sign(=,-) are working fine. Just plus sign has a problem. For example if I try to send "13+" plus is recognized as a blank -> "13 " in controller How can I solve it?

1 Answers

+ means space in an URL, so I'm assuming you're assembling an url query string by hand? If so, you need to encode + to %2B.

Related