AB Vyas AB Vyas - 1 year ago 96
ASP.NET (C#) Question

How can i create dynamic button click event on dynamic button?

I am creating one button on page dynamically.
Now I want to use button click event on that button.

How can I do this in c# asp.net?

Answer Source
Button button = new Button();
button.Click += (s,e) => { your code; };
//button.Click += new EventHandler(button_Click);

//protected void button_Click (object sender, EventArgs e) { }
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download