events tracking from container control in webtoolbar

Hi Guys,

I had a popup menu attached to a container control. This container control is attached to webtoolbar.

Anybody know how to trap the the selection_change event from the webtoolbar?

You’ll need to create an Event Definition on the ContanerControl and then forward the SelectionChanged event from the Popup to the Container. Then in your page, you’ll need to use an AddHandler call to forward the container’s event to a webpage method.

Here’s an example…

This thing is what I am missing from my code

[code]Dim itm As WebToolbarItem = Me.ItemAtIndex(0)

If itm IsA WebToolbarContainer Then
AddHandler ContainerControl1(WebToolbarContainer(itm).Container).SelectionChanged, AddressOf PopupEvent
End If[/code]

Thank Greg. Each of your reply with sample really help.

I even followed every response of yours because I got a lot of idea’s.