I programmatically created ImageButton on RowDataBound Event. I want to make ModalPopup appear when the ImageButton is clicked. How can i create an ImageButton_Click Event for the ImageButton?
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" });
}
}