This problem has been tangled up in my morning, no matter what kind of method of communication, go to the controller, that parameter will never change equal to NULL
Find a lot of solutions on the Internet
The above is from the Internet, the first: to mark the parameter as [Frombody], to become a simple parameter
Second: It is the way to pass the argument.
I just started to try it this way, but ... Still is null, I have been very silent, tangled for a long time.
Finally, continue to surf the Internet to check the information, found that the method is correct, but the above-mentioned way for the $.ajax () there is no effect, the specific reason I also xiao not,
But if you use $.post (), you can get the value in the controller. It's so ...
Finally use the $.post, and then remember in the controller parameter plus [Frombody], as well as the parameter mode, "= Your parameters"
If you know why $.ajax () can't be realized can tell me ha ~
Above.
Web API post passes a parameter value that is always null