OnBubbleEvent without RaiseBubbleEvent

  • Thread starter Thread starter jim corey
  • Start date Start date
J

jim corey

I have a page that has a button and there is also a usercontrol on the
page
which has an OK and Cancel button.

I'm looking at ways to trigger an event on the parent page when
the child control's OK button is clicked, so I tried adding
RaiseBubbleEvent,
and added the following to the code of the parent page:

Protected Overrides Function OnBubbleEvent(ByVal sender As Object,
ByVal e As EventArgs) As Boolean
Dim myButton As String = CType(sender, Button).ClientID

End Function


I found that any of the three buttons mentioned caused OnBubbleEvent
to fire, even when I removed RaiseBubbleEvent from the one place I had
it.

This doesn't seem correct. Or do buttons always trigger
RaiseBubbleEvent?
I have dropdown controls on the page which also can cause a postback,
but
these don't trigger the OnBubbleEvent.

Thanks for any comments
Jim
 
Hi,

Buttons call RaiseBubbleEvent when their OnCommand method is invoked.
OnCommand is invoked when RaisePostBackEvent is called (Button is clicked
and it raises Click event).
 
Back
Top