I have code that is part of an $.ajax call to MVC. Two functions that I hope will get executed based on a true or false from my controller.
success: function () {
$('#mark').html('<span style='color: Green;'> Correct</span>');
},
error: function () {
$('#mark').html('<span style='color: Red;'> Incorrect</span>')
}
But what should I return from the controller so I can call either the success or error? I didn't try Ajax before so can I just return
return(true) or
return(false)
In which case what would be the datatype I use for the return value in MVC?