It is one of the most important and most frequently asked interview question that "What is Event Bubbling?" And the answer is parent child events, the most apt description. But what exactly this means?
Server controls like Datagrid, DataList, Repeater can have other child
controls inside them. Example DataGrid can have combo box inside
datagrid. These child control do not raise there events by themselves,
rather they pass the event to the container parent (which can be a
datagrid, datalist, repeater), which passed to the page as "ItemCommand"
event.As the child control send there events to parent this is termed
as event bubbling.
.NET Framework provides this technique for child controls to pass their events up in the hierarchy. Event bubbling enables events to be raised from a more convenient
location in the controls hierarchy and allows event handlers to be
attached to the original control as well as to the control that exposes
the bubbled event.
A control can participate in event bubbling through two methods that it inherits from the base class System.Web.UI.Control
. These methods are OnBubbleEvent
. The following code shows the signatures of these methods.
protected virtual bool OnBubbleEvent(
protected void RaiseBubbleEvent(
More you can read on the following links