How to add an click event handler for multiple dynamically created buttons ?
Thanks in advance
Printable View
How to add an click event handler for multiple dynamically created buttons ?
Thanks in advance
You write a method just as you always do to handle an event, but without the Handles clause. If you're not sure about the method signature, add a Button in the designer, let the IDE create the method and then delete the Button. You then use the AddHandler statement to attach the method to the event. The MSDN documentation for the AddHandler statement will have more information and an example.