Event Handler

  • Thread starter Thread starter Alan T
  • Start date Start date
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?
 
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>
 
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

Back
Top