ICallbackContainer 接口


定义一个方法,使控件能够获取回调脚本。Defines a method that enables controls to obtain a callback script.

public interface class ICallbackContainer
public interface ICallbackContainer
type ICallbackContainer = interface
Public Interface ICallbackContainer


实现ICallbackContainer接口的类为控件提供了一个脚本, 该脚本将启动对服务器的回调。Classes that implement the ICallbackContainer interface provide controls with a script that will initiate a callback to the server. 回调不同于更常见的回发, 因为回调的页面处理会重新创建页面, 而不会更改页面持有的状态信息。A callback differs from the more common postback in that the page processing for the callback recreates the page without changing state information held by the page. 有关创建回调的详细信息, 请参阅实现无回发的客户端回调For more information on creating callbacks, see Implementing Client Callbacks Without Postbacks.

实现ICallbackContainer接口的类还应ICallbackEventHandler实现接口, 以处理由控件引发的事件。Classes that implement the ICallbackContainer interface should also implement the ICallbackEventHandler interface to handle the events raised by controls.


GetCallbackScript(IButtonControl, String)

创建一个脚本,以便启动针对 Web 服务器的客户端回调。Creates a script for initiating a client callback to a Web server.