Make sure there is an event declaration in the conrol:
Public Event BubbleUpRegister As EventHandler(Of EventArgs)
Add handler:
Protected Sub RegisterUnit1_BubbleUpRegister(ByVal sender As Object, ByVal e
As System.EventArgs) Handles RegisterUnit1.BubbleUpRegister
If this does not work, the control is likely NOT declared using WithEvents.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
*************************************************
Think outside of the box!
*************************************************
<di******@gmail.comwrote in message
news:11*********************@m7g2000cwm.googlegrou ps.com...
Hi,
Can anyone please tell me how to respond to an event in VB when a
programmatically created button is clicked?
I can get it to work if the addhandler event is in the pages Page_Load
sub but not in a custom routine.
Thanks.