System.Web 2.0.0.0

Implement the interface for any custom control that needs to receive callback events. For more information, see Client Callbacks Without Postbacks in ASP.NET Pages.

Examples of controls that implement the interface include the , , and controls. When a callback event targets a control that implements the interface, the method is called to handle the event, passing the event argument as a parameter and the method returns the result of the callback.

Controls that retrieve data from a data source control during callback can do so synchronously or asynchronously. ASP.NET controls like , , and are implemented synchronously. Synchronous callbacks do not prevent the user from working in the browser. In synchronous mode, only one callback at a time can execute, with the last callback taking precedence. When a Web control is implemented to support asynchronous behavior, multiple callbacks can be raised simultaneously. For details on asynchronous programming, see Asynchronous Programming Design Patterns.

You can specify whether callback events originating from the user interface rendered by a control implementing the interface are validated. Validation of events is a good security practice. However, for performance reasons you can disable it. To control whether event validation is performed on callback events, set the enableEventValidation attribute of the @ Page directive or the enableEventValidation attribute of the pages Element (ASP.NET Settings Schema) of the Web.config file. If you set the property in code, set it in the Page_Init phase of page processing. For more information on balancing the security benefit of event validation with its performance cost, see Performance Overview.

Used to indicate that a control can be the target of a callback event on the server.

- Method
  System.String

  Exceptions thrown in will not prevent from being called and returning a result. To prevent from returning a result, set a flag when an exception is thrown in and return an empty string from .

  Returns the results of a callback event that targets a control.

  The result of the callback.

  2.0.0.0
- Method
  System.Void `` To be added.

  When null is used as the event argument parameter, the string is serialized to "null" and sent back to the server. Because there is no way to distinguish between null and "null", you should avoid using null argument parameters with callbacks.

  Exceptions thrown in will not prevent from being called and returning a result. To prevent from returning a result, set a flag when an exception is thrown in and return an empty string from .

  Processes a callback event that targets a control.

  2.0.0.0