saying i have a defined button click event and i want to trigger (or call ) it from the code.
any example ?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Kirtan PatelPosted Dec 17, 2009, 1:52 PM
private void Form1_Load(object sender, EventArgs e)
{
//define Event handler Handler
button1.Click +=new EventHandler(button1_Click);
}
//define method Which will run when you click button
public void button1_Click(Object Sender, EventArgs e)
{
//Write Whatever you want to perform on button Click
}