Jquery的:
$('.btn-block').click(function () {
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
url: "ForgottenPassword.aspx/Test",
success: function (data) { alert("success"); },
error: function (data) { alert("fail"); }
})
});
代码背后:
<WebMethod>
<ScriptMethod(UseHttpGet:=True, ResponseFormat:=ResponseFormat.Json, XmlSerializeString:=False)>
Friend Async Sub Test()
//stuff
End Sub
每次尝试点击我的服务器端代码时,它都会报警失败。有谁知道我怎么能让它发挥作用?
我在代码中设置了一个断点,但它没有达到断点