I have a button with OnClick=Button_Click. I want to call Button_Click from another function but the problem is that I need to give it:
(object sender, EventArgs
Alternatively, if the action is done primarily by the button, or to avoid extra methods, as of .Net 4.0, there is a function called .PerformClick(). So
Button.PerformClick();
Would execute the button click from inside the code.