我可以找到的是这篇文章http://msdn.microsoft.com/en-us/magazine/cc163878.aspx@H_502_3@其中包括WebForm_DoCallback的实现,但是不能很好地解释参数本身.
function WebForm_DoCallback(eventTarget,eventArgument,eventCallback,context,errorCallback)
解决方法
target: The name of a server Control that handles the client@H_502_3@ callback. The control must implement@H_502_3@ the ICallbackEventHandler interface@H_502_3@ and provide a RaiseCallbackEvent@H_502_3@ method.
argument: An argument passed from the client script to the server@H_502_3@ RaiseCallbackEvent method.
clientCallback: The name of the client event handler that receives the@H_502_3@ result of the successful server event.
context: Client script that is evaluated on the client prior to@H_502_3@ initiating the callback. The result of@H_502_3@ the script is passed back to the@H_502_3@ client event handler.
clientErrorCallback: The name of the client event handler that receives@H_502_3@ the result when an error occurs in the@H_502_3@ server event handler.
useAsync: true to perform the callback asynchronously; false to@H_502_3@ perform the callback synchronously.
clientCallback和clientErrorCallback是客户端(通常是JavaScript)函数,参数的格式如下:
function clientCallback(returnmessage,context) {}
其中returnmessage是来自服务器的响应(或错误),上下文与之前传递的上下文相同.
参考文献:
MSDN: ClientScriptManager.GetCallbackEventReference Method