Hello,
I would like to create the Voting system for forum posts (similar as we are using in nopCommerce.com forums). I added to Nop.Web.Views.Board.Topic.cshtml this piece of code:
$('div.postvote div.voteup span').click(function () {
var forumPostId = $(this).parents('div.postvote').attr('id').split('_')[1];
alert('VoteUp, Post Id: ' + forumPostId + ', UserIsRegistered: ' + userIsRegistered);
if (userIsRegistered == "True") {
$.ajax({
url: "[mysite]/boards/votes.asmx/voteup",
type: "POST",
dataType: "json",
data: "{id:'" + forumPostId + "'}",
contentType: "application/json; charset=utf-8",
success: function (msg) {
...
},
error: function (e) {
alert('Unavailable');
}
});
}
});
But when I'm trying to debug the [mysite]/boards/votes.asmx/voteup Web Service call via Firefox Firebug, it gives me 302 error We're sorry, there is no Web page matching your request (or No Resources found).
I would like ask you what is needed for correct connecting to my Web Service .asmx file. Should I register this Web Service somewhere or give it to the Routes?
Thanks in advance.