.Net Ajax PageMethods를 사용하고 있습니다. 내 메서드에 자바 스크립트 배열을 전달할 수 있지만 나는 오류 받고있다 : "형식 'System.Array'배열의 deserialization 지원되지 않습니다 희망".배열을 .Net Ajax PageMethod에 전달할 수 있습니까?
클라이언트 측 코드 :
function AddItemsToBatch()
{
var stuff = new Array();
stuff[0] = "one thing";
stuff[1] = "some other thing";
PageMethods.AddToBatch(stuff,OnSuccess,OnFail);
}
서버 측 코드 :
<Web.Services.WebMethod()> Public Shared Function AddToBatch(ByVal stuff as Array) as Boolean
Return True
End Function
[PageMethods vs UpdatePanels] (http://izlooite.blogspot.com/2010/06/pagemethods-vs-updatepanels.html) –