0

I wonder whether it is possible to create functions for dynamic items (textboxes, buttons) like

private void Button_Click(object sender, EventArgs e)
private void TextBox_TextChanged(object sender, EventArgs e)

and other?

If yes, then how?

  • I know you can use DynamicalButton.Click(); but that doesn't help much.

EDIT

As example, you can make a function like Button_Click or TextBox_TextChanged, PictureBox_MouseOver easily when you make the objects with designer and they work properly. How to do that with dynamic objects?

1
  • Edited, check after EDIT Commented Sep 19, 2015 at 20:56

1 Answer 1

1

Found the answer

DynamicalObject.Click += new EventHandler(DynamicalObject_Click);
protected void DynamicalObject_Click (object sender, EventArgs e)
{
  what happens on the event
}

as example

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.