Note: This interface is new in the .NET Framework version 2.0.
Used to indicate that a control can be the target of a callback event to the server.
Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)
Visual Basic (Declaration)
Public Interface ICallbackEventHandler
Dim instance As ICallbackEventHandler
public interface ICallbackEventHandler
public interface class ICallbackEventHandler
public interface ICallbackEventHandler
public interface ICallbackEventHandler
Implement the ICallbackEventHandler interface for any custom control that needs to receive callback events. For more information, see Implementing Client Callbacks Without Postbacks in ASP.NET Web Pages.
Examples of controls that implement the ICallbackEventHandler interface include the GridView, DetailsView, and TreeView controls. When a callback event targets a control that implements the ICallbackEventHandler interface, the RaiseCallbackEvent method is called to handle the event, passing the event argument as a parameter and the GetCallbackResult method returns the result of the callback.
Controls that retrieve data from a data source control during callback can do so both synchronously and asynchronously. ASP.NET controls like GridView, DetailsView, and TreeView are implemented synchronously. 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 ICallbackEventHandler 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 EnableEventValidation 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 Developing High-Performance ASP.NET Applications.
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
.NET Framework
Supported in: 2.0