Original link:
http://www.cnblogs.com/andrewhappy/p/5427009.html
The problems closed for several days, the solution is actually simple.
Problems: jQuery.ajax a single value of the parameter to be passed to the server of the Control action, such as id = 1, the parameter generally considered writing data: data: {id: 1} is obtained and the various action null.
Solution:
- Deletion of contentType parameter jQuery.ajax
- The data parameter parentheses: ({id: 1})
Get.
Not my own resolve, programs from the Almighty stockoverflow, links http://stackoverflow.com/questions/2558870/asp-net-mvc-jquery-ajax-input-parameters-are-null
Reproduced in: https: //www.cnblogs.com/andrewhappy/p/5427009.html