First, when you call a method, you do not declare the type of the parameter, just the value.
So this is:
addPlayerBtn_Click_1(object sender, EventArgs e);
Must be
addPlayerBtn_Click_1(sender, e);
Now you need to declare sender and e . These can be actual objects if you have event arguments, or:
addPlayerBtn_Click_1(null, EventArgs.Empty);
The above can be used in both WinForms and ASP.NET. In the case of WinForms, you can also call:
addPlayerBtn.PerformClick();
source share