Login.OnBubbleEvent(Object, EventArgs) 方法

定义

确定是否将事件沿页面的用户界面 (UI) 服务器控件层次结构向上传递。Determines whether to pass an event up the page's user interface (UI) server control hierarchy.

protected:
 override bool OnBubbleEvent(System::Object ^ source, EventArgs ^ e);
protected override bool OnBubbleEvent (object source, EventArgs e);
override this.OnBubbleEvent : obj * EventArgs -> bool
Protected Overrides Function OnBubbleEvent (source As Object, e As EventArgs) As Boolean

参数

source
Object

事件的源。The source of the event.

e
EventArgs

一个包含事件数据的 EventArgsAn EventArgs containing the data for the event.

返回

如果事件已被取消,则为 true;否则为 falsetrue if the event has been canceled; otherwise, false. 默认为 falseThe default is false.

注解

OnBubbleEvent 方法实现 Control.OnBubbleEvent 方法,以将事件从子控件传递到页层次结构。The OnBubbleEvent method implements the Control.OnBubbleEvent method to pass events from child controls to the page hierarchy.

如果当前事件由 Login 控件登录按钮发布,则 Login 控件会尝试登录到网站。If the current event is posted by the Login control Login button, the Login control attempts to log in to the Web site. 否则,该事件将向上传递页面控件层次结构。Otherwise, the event is passed up the page control hierarchy.

继承者说明

在派生类中重写 OnBubbleEvent(Object, EventArgs) 时,一定要调用基类的 OnBubbleEvent(Object, EventArgs) 方法,以便已注册的委托对事件进行接收。When overriding OnBubbleEvent(Object, EventArgs) in a derived class, be sure to call the base class's OnBubbleEvent(Object, EventArgs) method so that registered delegates receive the event.

适用于

另请参阅