Asp.net ajax 调用WebService 用userContext 传递不了参数的错误

 

userContext = workerID;

WorkerService.Delete(workerID, onDeleteSuccceed, onDeleteError, userContext );

 

function onDeleteSuccceed(userContext )

{

  alert(userContext );  // null
}

 

原因: 尽管WorkerService.Delete, 没有返回值, 也要在回调函数中添加result 参数.

 

function onDeleteSuccceed(result, userContext )

{

  alert(userContext );  // OK

}

 

posted @ 2010-04-27 13:39  Ken-Cai  阅读(221)  评论(0编辑  收藏  举报