Event Handler

A

Alan T

I would like to create a button at run time, how do I assign an event
handler to the button's onClick event?
 
M

Maverick

Alan said:
I would like to create a button at run time, how do I assign an event
handler to the button's onClick event?

Hi,

button1.Click+=<EventHandlerDelegate>
 
P

PhreakRox

this.Button.Click +=new EventHandler(Button_Click);

Basically what Maverick said
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top