protected void GridView2_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.DataItemIndex >= 0)
        {
            Button lb = (Button)e.Row.Cells[9].Controls[0];
            lb.Attributes.Add("onclick", "return window.confirm('你确定删除吗?');");
        }
    }更改为
   protected void GridView2_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.DataItemIndex >= 0)
        {
            ImageButton lb = (ImageButton)e.Row.Cells[9].Controls[0];
            lb.Attributes.Add("onclick", "return window.confirm('你确定删除吗?');");
        }
    }
   如果改为ImageButton 图片可以显示了,就无法触发RowDeleting事件了!!
高手帮忙解决一下 !!!!为什么使用ImageButton无法就不执行RowDeleting运行环境vs2005