Try this,
underline codes are corrected
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "http://localhost:4780/WebServiceRegistering.asmx/Registering",
data: "{ 'Id': 8 }",
contentIype: "application/json",
datatype: "json",
success: function (data) {
alert(data.d);
},
error: function (data) {
alert(" Error aaaaaaa");
}
});
Make sure the
ScriptService
attribute is added to the webservice
[System.Web.Script.Services.ScriptService]
public class WebServiceRegistering : System.Web.Services.WebService