C#为控件增加或删除委托

        protected void Page_Load(object sender, EventArgs e)
{
if (!Biz.Process.IsTobe(pId))
{
this.btnDetermine.Click -= new System.EventHandler(btnDetermine_Click);
this.btnDetermine.Click += new System.EventHandler(btnCancel_Click);
}
}

protected void btnDetermine_Click(object sender, EventArgs e)
{

}

protected void btnCancel_Click(object sender, EventArgs e)
{

}

 

你可能感兴趣的:(C#)