Event

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

Hello,

I have the following:

Parent > Child > Button

Parent is a custom control. Child is another custom control added to
Parent. Button is an ASP.NET button added to Child control.

Parent has a custom event named Submit.

Is it possible to fire this event when Button is submitted?

Something like having inside Child class:

Private Sub MyButton_Click(...) Handles MyButton.Click

End Sub

Where Parent is the Parent control to which the Child is added?

Thanks,

Miguel
 
I would likely expose this Submit event at the Child level. Then when you
write a control that uses the Child control you can choose to expose this
event from the Parent control. You can then do whatever you want when the
submit event happens...
 
Hello,

I have the following:

Parent > Child > Button

Parent is a custom control. Child is another custom control added to
Parent. Button is an ASP.NET button added to Child control.

Parent has a custom event named Submit.

Is it possible to fire this event when Button is submitted?

Something like having inside Child class:

Private Sub MyButton_Click(...) Handles MyButton.Click


End Sub

Where Parent is the Parent control to which the Child is added?

Thanks,

Miguel

Hi.

After Post back or submit the button. if you reload the custom control
asp.net will fire the event handler of submit button if you have
defined it. well then its your job to bubble up the submit event to
child control perhaps via declaring a event delegate and event.

Thanks

Masudur
 
Back
Top