button1.click c# code example Example: C# button click dynamicButton.Click += new EventHandler(DynamicButton_Click);