Event

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
 
P

Patrice

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...
 
M

Masudur

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Bubble Event 2
Fire Event 1
How to make this? 1
Override Css Class 1
Event 1
Event 0
Bubble Event 0
Button Click 1

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top