更新时间:2023-09-29 18:12:58
按钮按钮=新按钮();
button.Click + =(S,E)=> {你的code; };
//button.Click + =新的EventHandler(button_Click);
container.Controls.Add(按钮);
//保护无效button_Click(对象发件人,EventArgs五){}
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?
Button button = new Button();
button.Click += (s,e) => { your code; };
//button.Click += new EventHandler(button_Click);
container.Controls.Add(button);
//protected void button_Click (object sender, EventArgs e) { }