jquery - POST HTTP://localhost:53122/albumlist.aspx/www 404 (Not Found) -


i using vb.net .i need call function written in albumlist.aspx using jquery below:

var l = window.location; var base_url = l.protocol + "//" + l.host; $(".pagen ").click(function() {   var num = $(this).attr('id');   $.ajax({     type: "post",     url: base_url + '/albumlist.aspx/www',     data: {       id: num     },     datatype: 'json',     encode: true,     async: false,     cache: false,     success: function(response) {       console.log(response);     },     error: function(jqxhr, textstatus, errorthrown) {}   }); }); 

function is:

public function wwww(byval id integer) string     return "jhgfjhf" end function 

using code, getting 'post http://localhost:53122/albumlist.aspx/www 404 (not found)'. should do, new vb.

there other problems, can spot @ least two. first, have mark method <webmethod> attribute. second, methods inside of .aspx page must marked shared in order visible web methods.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -