Hi @Nick R
Try to modify your code as below:
<script>
function saveEntry(value) {
var id = value;
$.ajax({
type: 'POST',
data: { item : id },
url: '@Url.Action("SaveEntry", "Contest")',
contentType: 'json',
success: function (r) {
alert(r);
},
error: function () {
alert('Something went wrong. Please refresh the page and try again.');
}
});
}
</script>
The result as below:
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Dillion