0

我以编程方式在 RowDataBound 事件上创建了 ImageButton。我想让 ModalPopup 在单击 ImageButton 时出现。如何为 ImageButton 创建 ImageButton_Click 事件?

 protected void gv_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Cells[index].Controls.Add
                (new ImageButton { ImageUrl = "Images/img.png", ID = "imgbtn" });
         } 
     }
4

0 回答 0