System.Web.UI.Control.OnBubbleEvent Method

Determines whether the event for the server control is passed up the page's UI server control hierarchy.

Syntax

protected virtual bool OnBubbleEvent (object source, EventArgs args)

Parameters

source
The source of the event.
args
An EventArgs object that contains the event data.

Returns

true if the event has been canceled; otherwise, false. The default is false.

Remarks

ASP.NET server controls such as the System.Web.UI.WebControls.Repeater, System.Web.UI.WebControls.DataList and System.Web.UI.WebControls.GridView Web controls can contain child controls that raise events. For example, each row in a System.Web.UI.WebControls.GridView control can contain one or more buttons created dynamically by templates. Rather than each button raising an event individually, events from the nested controls are "bubbled"—that is, they are sent to the naming container. The naming container in turn raises a generic event called System.Web.UI.WebControls.GridView.RowCommand with parameter values. These values allow you to determine which individual control that raised the original event. By responding to this single event, you can avoid having to write individual event-handling methods for child controls.

Requirements

Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0