In my url, I have “?msg=hello+world”, and in my action, it’s converting the value to “hello world”
public ActionResult test(string msg) {
// msg has a value of "hello world", even tho "hello+world" was passed in
}
How can I have my mvc action take it as-is?
Thanks.
If you want the string to be sent across ‘as is’ then encode it: