I mean that are both custom controls developed by you so that you can change their behaviour. Raising ("publishing") an event and subscribing to it is pretty trivial task. In the simplest scenario something like this:
On the publishing control have a public member that represents the event say:
Public Event <Eventname> As EventHandler
In the publishing control when you want to raise the event call:
RaiseEvent <EventName>(Me,EventArgs.Empty)
(EventArgs empty is the empty event arguments when there's no need to pass anything custom event arguments).
The subscribing control just needs have typed reference (in VS.NET type of the code-behind class) to the control publishing the event so that it can wire up an event handler method. Say:
Dim publisher As <type>=CType(FindControl("publisherID"),<type>)
AddHandler publisher.<EventName>,AddressOf <event handler method name>
where <event handler method name> is the handler that is called when event <EventName> is raised on publishing control. It can then do what it needs to do by the logic. The method signature just needs to match the delegate type (EventHandler) of the event.
Note that the previous code to look for the subscriber would be valid when event is exposed by the child control. If event is exposed by the parent control, you need to reference it via the Parent property that you cast or say call Page.FindControl and then cast etc.
Thanks,
Teemu Keiski
Finland, EU