I have the following ajax call on my page:
$.ajax({
url: 'EquipamentoTemControleFuncionamento',
data: { contratocod: contratocod, numeroserie: numerodeserie },
type: 'POST',
dataType: 'JSON',
success: function(retorno) {
alert('success:' + retorno);
},
error: function() {
alert('error');
}
});
And the following method in my controller that calls another model method that returns a bool:
public JsonResult EquipamentoTemControleFuncionamento(string contratocod, string numeroserie)
{
ControleFuncionamentoModel cfm = new ControleFuncionamentoModel();
return Json(cfm.EquipamentoTemControleFuncionamento(contratocod, numeroserie));
}
I put a breakpoint in the controller method, but it is not stopping. I want to return the boolean of the MethodControlFoundation method via ajax. What should I do?