S
Scott
Please help.
I have ImageButtons that are created dynamically and the event to be
called onclick of the button is stored in a database. The event
itself will be prewritten, however it is on a separate .vb page than
the aspx.vb codebehind file. I have not been able to get the button
to fire the event. here is the code:
Dim button as new imageButton
button.imageURL=image.gif
button.ID="buttonName"
AddHandler button.click, AddressOf btnLookup_Click
A separate section in the same .vb file is:
Protected Sub btnLDAPLookup_Click(ByVal s As Object, ByVal e As
EventArgs)
DO SOMETHING
End Sub
What am I doing wrong? Should it be a protected sub? Does it matter
that the sub is located in a .vb file, with the button initialization,
that is not the same aspx.vb file?
Any help is greatly appreciated.
I have ImageButtons that are created dynamically and the event to be
called onclick of the button is stored in a database. The event
itself will be prewritten, however it is on a separate .vb page than
the aspx.vb codebehind file. I have not been able to get the button
to fire the event. here is the code:
Dim button as new imageButton
button.imageURL=image.gif
button.ID="buttonName"
AddHandler button.click, AddressOf btnLookup_Click
A separate section in the same .vb file is:
Protected Sub btnLDAPLookup_Click(ByVal s As Object, ByVal e As
EventArgs)
DO SOMETHING
End Sub
What am I doing wrong? Should it be a protected sub? Does it matter
that the sub is located in a .vb file, with the button initialization,
that is not the same aspx.vb file?
Any help is greatly appreciated.