.NET Framework 类库
ICallbackEventHandler..::.RaiseCallbackEvent 方法

更新:2007 年 11 月

处理以控件为目标的回调事件。

命名空间:  System.Web.UI
程序集:  System.Web(在 System.Web.dll 中)

语法

Visual Basic(声明)
Sub RaiseCallbackEvent ( _
    eventArgument As String _
)
Visual Basic (用法)
Dim instance As ICallbackEventHandler
Dim eventArgument As String

instance.RaiseCallbackEvent(eventArgument)
C#
void RaiseCallbackEvent(
    string eventArgument
)
Visual C++
void RaiseCallbackEvent(
    String^ eventArgument
)
J#
void RaiseCallbackEvent(
    String eventArgument
)
JScript
function RaiseCallbackEvent(
    eventArgument : String
)

参数

eventArgument
类型:System..::.String

一个字符串,表示要传递到事件处理程序的事件参数。

备注

如果将 nullNothingnullptrnull 引用(在 Visual Basic 中为 Nothing 用作事件变量参数,则字符串将被序列化为“null”并被发送回服务器。由于无法区分 nullNothingnullptrnull 引用(在 Visual Basic 中为 Nothing 和“null”,因此应当避免将 nullNothingnullptrnull 引用(在 Visual Basic 中为 Nothing 变量参数用于回调。

RaiseCallbackEvent 中引发的异常将不会阻止调用 GetCallbackResult 和返回结果。若要阻止 GetCallbackResult 返回结果,请在 RaiseCallbackEvent 中引发异常时设置一个标志并从 GetCallbackResult 中返回空字符串。

平台

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

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.5、3.0、2.0
另请参见

参考

标记 :


Page view tracker