Мой код не работает, я не знаю почему.
Мой код вызова ajax:
var id = $(this).attr("data-id")
$.ajax({
type: "POST",
url: "XTM307.aspx/GetPart",
data: { "id": id },
contentType: "application/json",
dataType: "json",
success: function (response) {
}
});
Код моего сервера:
<System.Web.Services.WebMethod()>
<ScriptMethod(UseHttpGet:=True, ResponseFormat:=ResponseFormat.Json)>
Public Shared Sub GetPart(id As String)
Dim test = 2
test += 3
End Sub