WebMethod not being called

Try following fixes for your Ajax request:

 $.ajax({
            type: "post",
            url: "Playground.aspx/childBind",
            data: "{sendData: '" + ID + "'}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (result) { alert("successful!" + result.d); }
        })

Notice changed dataType and data value as a string.

Leave a Comment