I've been looking for a solution to this for several hours now and cannot find a solution.
The Scenario:
- I have a masterpage baseclass (called basemaster)
- All of my master pages inherit from basemaster
- basemaster defines an event 'Public Event HandleClickEvent As EventHandler'
- I have a masterpage named master1
- master1 defines an event handler 'Public Shadows Event HandleClickEvent As EventHandler'
- master1 has a user control named usr1
- usr1 has a button that raises event ButtonClicked when clicked
- I have a page (thePage) that uses master1
- thePage has a button click event handler that it registers like so: 'AddHandler Master.HandleClickEvent, AddressOf HandleTheClick'
master1 has code something like:
Protected Sub Usr1_ButtonClicked(ByVal sender As Object, ByVal e As System.EventArgs) Handles Usr1.ButtonClicked RaiseEvent HandleClickEvent(sender, e) End Sub
when thePage loads I see it register the handler on master1
- when the button is clicked, Usr1_ButtonClicked is fired and I step through the RaiseEvent but HandleClickEvent on thePage is never reached.
I think I'm doing something stupid. I would appreciate some help.
Thanks!