Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ClientScriptManager.GetCallbackEventReference Method (Control, String, String, String, String, Boolean)

Obtains a reference to a client function that, when invoked, initiates a client call back to server events. The client function for this overloaded method includes a specified control, argument, client script, context, error handler, and Boolean value.

Namespace:  System.Web.UI
Assembly:  System.Web (in System.Web.dll)
public string GetCallbackEventReference(
	Control control,
	string argument,
	string clientCallback,
	string context,
	string clientErrorCallback,
	bool useAsync


Type: System.Web.UI.Control

The server Control that handles the client callback. The control must implement the ICallbackEventHandler interface and provide a RaiseCallbackEvent method.

Type: System.String

An argument passed from the client script to the server RaiseCallbackEvent method.

Type: System.String

The name of the client event handler that receives the result of the successful server event.

Type: System.String

The client script that is evaluated on the client prior to initiating the callback. The result of the script is passed back to the client event handler.

Type: System.String

The name of the client event handler that receives the result when an error occurs in the server event handler.

Type: System.Boolean

true to perform the callback asynchronously; false to perform the callback synchronously.

Return Value

Type: System.String
The name of a client function that invokes the client callback.

The Control specified is null.


The Control specified does not implement the ICallbackEventHandler interface.

This overload of the GetCallbackEventReference method requires a useAsync and a clientErrorCallback parameter. The useAsync parameter allows you to perform the client callback asynchronously by setting the value to true. The overload versions of this method that do not require the useAsync parameter set the value to false by default. The clientErrorCallback parameter allows you to define the name of the client function that is called if the server handler (the RaiseCallbackEvent method) returns an error. The overload versions of this method that do not require the clientErrorCallback parameter set the value to null.

For more information on this method, see the remarks for the overload GetCallbackEventReference method.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.