I have an ImageButton inside a repeater control. I have attached an eventhandler to the OnClick event of the ImageButton. But when I click the ImageButton the event does not
I had det same problem, and solved it by using av asp:Linkbutton with a with the "OnCommand" event. My markup and code behind is posted below.
Markup:
Code behind:
protected void lbRemove_Command(object sender, CommandEventArgs e)
{
switch (e.CommandName)
{
case "Remove":
Recipients.Remove(e.CommandArgument.ToString());
rptRecipients.DataSource = Recipients;
rptRecipients.DataBind();
break;
}
}