I encountered an issue with this code snippet
function AddComment(id) {
var input = $("#" + "CommentOnPost" + id).val();
var commentHolder = $("#commentDiv" + id);
commentHolder.empty();
$.ajax({
url: 'Account/AddCommentToPost',
data: { postId: id, text:input },
dataType: 'json',
cache: false,
success: function (result) {
//irrelevant
},
});
}
During debugging, I noticed that an unexpected parameter is included in the request:
https://localhost:44398/Account/AddCommentToPost?postId=1&text=gd&_=1596616234410
The presence of the extra parameter "_" is causing an issue, is there a way to resolve this?