문자열을 포함하는 javascript 변수를 jquery.ajax를 통해 서버에 전달합니다. "성공"조건이 호출되었지만 서버 측 WebMethod는 호출되지 않습니다. 클라이언트 :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");
}