I have a couple of buttons and a textbox. I want to make it so that when I press button1 the text from the textbox goes to button and when I press button2 the text goes to button2 and so on. I now have this:
protected void Button1_Click(object sender, EventArgs e)
{
Button1.Text = TextBox1.Text;
}
protected void Button2_Click(object sender, EventArgs e)
{
Button2.Text = TextBox1.Text;
}
protected void Button3_Click(object sender, EventArgs e)
{
Button3.Text = TextBox1.Text;
}
Edit: Is there a shorter way to do this?