How to write on button clicked in C# code example Example: C# button click dynamicButton.Click += new EventHandler(DynamicButton_Click);