Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
ICallbackEventHandler Interface

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

Namespace:  System.Web.UI
Assembly:  System.Web (in System.Web.dll)
Visual Basic (Declaration)
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public Interface ICallbackEventHandler
Visual Basic (Usage)
Dim instance As ICallbackEventHandler
C#
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public interface ICallbackEventHandler
Visual C++
[AspNetHostingPermissionAttribute(SecurityAction::LinkDemand, Level = AspNetHostingPermissionLevel::Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction::InheritanceDemand, Level = AspNetHostingPermissionLevel::Minimal)]
public interface class ICallbackEventHandler
JScript
public interface ICallbackEventHandler

Implement the ICallbackEventHandler interface for any custom control that needs to receive callback events. For more information, see Implementing Client Callbacks Programmatically 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 synchronously or asynchronously. ASP.NET controls like GridView, DetailsView, and TreeView 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 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 Performance Overview.

TopicLocation
Client Callback with Validation Implementation ExampleBuilding ASP .NET Web Applications
Client Callback with Validation Implementation ExampleBuilding ASP .NET Web Applications
Client Callback with Validation Implementation ExampleBuilding ASP .NET Web Applications in Visual Studio
Client Callback with Validation Implementation ExampleBuilding ASP .NET Web Applications in Visual Studio
Client-Callback Implementation (C#) ExampleBuilding ASP .NET Web Applications
Client-Callback Implementation (C#) ExampleBuilding ASP .NET Web Applications
Client-Callback Implementation (C#) ExampleBuilding ASP .NET Web Applications in Visual Studio
Client-Callback Implementation (C#) ExampleBuilding ASP .NET Web Applications in Visual Studio
Client-Callback Implementation (Visual Basic) ExampleBuilding ASP .NET Web Applications
Client-Callback Implementation (Visual Basic) ExampleBuilding ASP .NET Web Applications
Client-Callback Implementation (Visual Basic) ExampleBuilding ASP .NET Web Applications in Visual Studio
Client-Callback Implementation (Visual Basic) ExampleBuilding ASP .NET Web Applications in Visual Studio
How to: Implement Callbacks in ASP.NET Web PagesBuilding ASP .NET Web Applications
How to: Implement Callbacks in ASP.NET Web PagesBuilding ASP .NET Web Applications
How to: Implement Callbacks in ASP.NET Web PagesBuilding ASP .NET Web Applications in Visual Studio
How to: Implement Callbacks in ASP.NET Web PagesBuilding ASP .NET Web Applications in Visual Studio
Implementing Client Callbacks Programmatically Without Postbacks in ASP.NET Web PagesBuilding ASP .NET Web Applications in Visual Studio
Implementing Client Callbacks Without PostbacksBuilding ASP .NET Web Applications in Visual Studio
Implementing Client Callbacks Without Postbacks in ASP.NET Web PagesBuilding ASP .NET Web Applications
Implementing Client Callbacks Without Postbacks in ASP.NET Web PagesBuilding ASP .NET Web Applications

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

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

.NET Framework

Supported in: 3.5, 3.0, 2.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker