Most Viewed

Most Viewed

Sunday 15 July 2012

Event Bubbling in .Net

Event Bubbling in C#.Net

the repeater can do more than just displaying data. it can contain some other controls in the itemtemplate. all these controls are called child controls to the parent control the repeater (or anyother container) when the child raises an event the parent can handle that event which is called eventbubbling.

datalist,datagrid also support event bubbling.

this is a better approach because its difficult to for each individual child control to have its own eventhandlers

now everthing is taken care of the parent or the container control.

but how do the parent know which particular child had raised the event. we have commandsource property for a container which helps us to figure it out . 

No comments:

Post a Comment