Hi, I am trying to capture the click event of an ImageButton that exists in
a composite server control that I am building.
I create the imagebutton in the CreateChildCont rols routine
[vbcode]
' Create the button
Dim imgButton as New ImageButton
' Add click event handler
AddHandler imgButton.Click , AddressOf OnSend
I then add the control to the controls collection....
Me.Controls.Add (imgButton)
[/vbcode]
When I view the page the imagebutton displays correctly but whenever I click
it the event is not raised. My OnSend routine is below
[vbcode]
Protected Overridable Sub OnSend(ByVal sender As Object, ByVal e As
ImageClickEvent Args)
Me.Parent.Page. Response.Redire ct("http://www.microsoft.c om")
End Sub
[/vbcode]
I am also implementing the INamingContaine r to create distinct names. Any
ideas welcomed :)
Thanks
Mark