How to manipulate controls with code

This article told developer how to manipulate controls with code

The relationship between control items and code is based on event triggering.

After the event is triggered, we can start writing our program.

This time we will try to display the number on the button in the textbox by clicking the button.

How to enter the program page?

private void button1_Click(object sender, EventArgs e)
{
        txtInput.Text = button1.Text;
}

The program means that the Text property of txtInput is set to the Text content of button1

txtInput is the name of my control item, and the Text property is the text content of txtInput