jquery.ajax経由で文字列を含むjavascript変数をサーバーに渡しています。 「成功」条件が呼び出されたにもかかわらず、サーバー側のWebメソッドは呼び出されません。クライアント:WebMethodが呼び出されていない
$.ajax({
type: "post",
url: "Playground.aspx/childBind",
data: {sendData: ID},
//contentType: "application/json; charset=utf-8",
dataType: "text",
success: function (result) { alert("successful!" + result.d); }
})
サーバー:
[WebMethod]
public static string childBind(string sendData)
{
return String.Format("Hello");
}