try
$('#rating-5').click(function () {
alert($('#rating-5').prop("checked"));
$.ajax
({
url: '/Home/Filters',
type: 'POST',
data: { id: $('#rating-5').prop("checked") },
dataType: 'json',
success: function (result) {
alert(result);
console.log(result);
},
error: function (status) {
alert(status);
}
});
});
The argument name in the controller method and ajax "data" property should be same, in your case it is "
id
" and "
sdsd
"
To get the value from the checkbox use "
checked
" property.