Net-informations.com
SiteMap  | About    

What is a bubbled event?

Handling child controls events through parent control in data bind controls known as event bubbling. That means, when events occurred in child controls , the event is bubbled to the parent control. 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. To handle or to raise the bubbled event, a control must override the OnBubbleEvent method. RaiseBubbleEvent sends the event data up the hierarchy to the control's parent.

Any event defined on a server control can be bubbled . Server controls like Datagrid, DataList, and Repeater can have other child controls inside them. For example, DataGrid can have combo box inside datagrid. These child control do not raise their 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 events to parent it is termed as event bubbling .









net-informations.com (C) 2018    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.