System.Web.UI.WebControls.ImageButton ImageBox = new System.Web.UI.WebControls.ImageButton();
ImageBox.ImageUrl="upimage/"+ r1["imagepath"].ToString();
ImageBox.ID = "xxx";
ImageBox.Click +=new System.Web.UI.ImageClickEventHandler(aa);
private void aa(object sender, System.Web.UI.ImageClickEventArgs E)
{
ImageButton ib = (ImageButton)sender;
if (ib.ID == "xxx")
....
//
}
转载于:https://www.cnblogs.com/pchgo/archive/2009/03/23/1419788.html