怎样自动生成buttton控件并可触发其事件
怎样自动生成buttton控件并可触发其事件
------解决方案--------------------Button btn = new Button();
btn.Text = "CLICK ";
btn.Click +=new EventHandler(btn_Click);
this.Panel1.Controls.Add(btn);
private void btn_Click(object sender, EventArgs e)
{
Response.Write( "OK ");
}