ClientScriptManager.GetCallbackEventReference Method (Control, 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, 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, 
	bool useAsync
)
public String GetCallbackEventReference (
	Control control, 
	String argument, 
	String clientCallback, 
	String context, 
	boolean useAsync
)
public function GetCallbackEventReference (
	control : Control, 
	argument : String, 
	clientCallback : String, 
	context : String, 
	useAsync : boolean
) : String
Not applicable.

Parameters

control

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

argument

An argument passed from the client script to the server

RaiseCallbackEvent method.

clientCallback

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

context

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.

useAsync

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

Return Value

The name of a client function that invokes the client callback.

Exception typeCondition

ArgumentNullException

The Control specified is a null reference (Nothing in Visual Basic).

InvalidOperationException

The Control specified does not implement the ICallbackEventHandler interface.

This overload of the GetCallbackEventReference method requires a useAsync parameter, which 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.

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

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: