我可以調用我的ASP.Net頁面方法,如果我使用POST,但是如果我嘗試GET失敗,就可以調用。 任何想法爲什麼?使用GET調用PageMethod w/jQuery
var url = encodeURI(acx.opts.queryURL + "?t=" + acx.input.val());
acx.requestExe = $.ajax({ type: "GET",
url: url ,
//data: "{\"t\":\"" + acx.input.val() + "\"}", //Data To Send If POST
contentType: "application/json", //Of Request
dataType: "json", //Return Type Expected
cache: true,
success: function(d) { showQueryResults(acx,d); },
error: function(d)
{
var r = JSON.parse(d.responseText);
alert(r.Message);
}
});