Hi Friends
What is event bubbling ?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Smart LuckyPosted May 18, 2013, 5:48 AM
The ASP.NET page framework provides a technique called event bubbling that allows a child control to propagate events up its containment 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.
Event bubbling is used by the data-bound controls (Repeater, DataList, and DataGrid) to expose command events raised by child controls (within item templates) as top-level events. While ASP.NET server controls in the .NET Framework use event bubbling for command events (events whose event data class derives from CommandEventArgs), any event defined on a server control can be bubbled.
Datta KharadPosted Jan 28, 2012, 2:19 AM
Event Bubbling:-
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 and RaiseBubbleEvent. The following code shows the signatures of these methods.
protected virtual bool OnBubbleEvent(object source,EventArgs args);
protected void RaiseBubbleEvent(object source,EventArgs args );
Gaurang UpadhyayPosted Jan 28, 2012, 1:34 AM
Event bubbling is used by the data-bound controls (Repeater,DataList and DataGrid) to expose command events raised by child controls (within item templates) as top-level events.
While ASP.NET server controls in the .NET Framework use event bubbling for command events (events whose event data class derives from CommandEventArgs), any event defined on a server control can be bubbled.
For Example Grid Control
When you Select Dropdown value is its autopost back property True then the event of child control call its calling Event bubbling .
Fore More Info :
http://aspdotnetcodebook.blogspot.com/2009/11/event-bubbling-in-aspnet.html
Thanks & Regards,
Gaurang Upadhyay
Sr Developers