Pass dynamic data to mvc controller with AJAX
- by Yustme
How can I pass dynamic data with an AJAX call to an MVC Controller?
Controller:
public JsonResult ApplyFilters(dynamic filters){
return null;
}
The AJAX call:
$(':checkbox').click(function (event) {
var serviceIds = $('input[type="checkbox"]:checked').map(function () {
return $(this).val();
}).toArray();
…