Home / AJAX

Generated Proxy Classes Succeeded Callback Function

RSS
Modified on 2009/11/14 19:13 by Administrator Categorized as Uncategorized

Called to process returned data after a Web service method request has finished successfully.

NoteNote:

The succeeded callback function can have any name.

function SucceededCallback(result, userContext, methodName)
{
    // Code here to process results from the Web service call.
}

Parameters

Parameter

Definition

result

The data returned from the Web service method call. This is a JavaScript object whose type corresponds to the .NET Framework type returned by the Web method.

userContext

The context information that was passed when the Web service method was invoked. If the context information is not passed, the defaultUserContext object is used, if defined; otherwise null is passed to the callback function. The userContext value provides additional information that you can use to process the returned data.

methodName

The Web service method that was invoked. The methodName parameter provides additional information to use when you process the returned data.

Remarks

The succeeded callback function is a JavaScript function that you provide to process the returned data after a Web service request finishes successfully.

You can assign the callback function to the generated proxy class or its instances by using the defaultSucceededCallback property. Alternatively, you can pass the callback function when you call a Web service method. This overrides the default value.

Example

The following example shows how to define a succeeded callback function.

See Also