グリッドビューのフッターから ImageButton のイベント クリックを発生させようとしましたが、発生しませんでした。事前に感謝します。コードは次のとおりです。
protected void grvBubDetails_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Footer)
{
ImageButton imgbtnSendMail = new ImageButton();
//ImageButton imgEdit = new ImageButton();
imgbtnSendMail.ImageUrl = "~/Images/mail01.png";
imgbtnSendMail.AlternateText = "Edit";
imgbtnSendMail.ToolTip = "for send mail press here";
imgbtnSendMail.Width = imgbtnSendMail.Height = 20;
//imgbtnSendMail.CommandName = "sendMail";
//imgbtnSendMail.CommandArgument = "somevalue";
imgbtnSendMail.Click += new ImageClickEventHandler(imgbtnSendMail_Click);
//imgbtnSendMail.Attributes["runat"] = "server";
//imgbtnSendMail.Attributes["onclick"] = "imgbtnSendMail_Click";
e.Row.Cells[6].Controls.Add(imgbtnSendMail);
}
}
protected void imgbtnSendMail_Click(object sender, ImageClickEventArgs e)
{
string Text = "Image clicked";
}