Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9057955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T14:35:52+00:00 2026-06-16T14:35:52+00:00

So I have the following code for when the Add player button is clicked

  • 0

So I have the following code for when the “Add player” button is clicked

private void addPlayerBtn_Click_1(object sender, EventArgs e)
{
    //Do some code
}

I want to trigger this code from my SDK however. Here is what I have tried

private void command()
{       
    addPlayerBtn_Click_1(object sender, EventArgs e);          
}

I get lots of errors as soon as I put in the line

 addPlayerBtn_Click_1(object sender, EventArgs e) 

Could somebody please tell me how to write the code so that I can trigger an event by just writting it in code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T14:35:53+00:00Added an answer on June 16, 2026 at 2:35 pm

    For one, when calling a method, you don’t declare the type of the parameter, just the value.

    So this:

    addPlayerBtn_Click_1(object sender, EventArgs e);
    

    Should be

    addPlayerBtn_Click_1(sender, e);
    

    Now, you’ll have to declare sender and e. These can be actual objects, if you have event args to pass, or:

    addPlayerBtn_Click_1(null, EventArgs.Empty);
    

    The above can be used in either WinForms or ASP.NET. In the case of WinForms, you can also call:

    addPlayerBtn.PerformClick();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following Powershell code: Add-Type -Assembly System.Configuration [ExeConfigurationFileMap] $configMap = New-Object ExeConfigurationFileMap
I have the following php code which I want to add a delay too:
I have the following code to add authentication cookie to the response and redirect
I have following code: os.chdir(os.path.dirname(os.path.realpath(__file__)) + /../test) path.append(os.getcwd()) os.chdir(os.path.dirname(os.path.realpath(__file__))) Which should add /../test to
I have the following code: SPList list = web.Lists[this.ListName]; SPListItem item = list.Items.Add(); now
I have the following code in a php page <div class=vmenu> <div class=first_li><span >Add
I have added a UIScrollVIew using IB. Then using the following code i add
Say I have the following code to add a clickable image after a set
I have the following code #define PROC_ADD void main(void) { while(1) { #ifdef PROC_ADD
I have the following code which I was using to attempt to dynamically add

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.