|
-
Jul 16th, 2014, 07:08 AM
#1
Thread Starter
Hyperactive Member
Event Handler for dynamically created Buttons
How to add an click event handler for multiple dynamically created buttons ?
Thanks in advance
-
Jul 16th, 2014, 07:18 AM
#2
Re: Event Handler for dynamically created Buttons
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.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|