按钮Button动态事件的名称
protected override void OnInit(EventArgs e)
{
}
protected void Page_Load(object sender, EventArgs e)
{
this.Events.AddHandler("OnButton", new EventHandler(BtnShow));
this.Button1.Click += (EventHandler)this.Events["OnButton"];
}
private void Button1_Click(object sender, System.EventArgs e)
{
Response.Write("成功");
}
public void BtnShow(object sender, System.EventArgs e)
{
Response.Write("成功");
}