in .ASPX this is working
<asp:ImageButton ID="lbHope6" runat="server" ImageUrl="~/Shared/Images/Site/ChartTypeProd.png"
CssClass="chart" OnClick="lbHope6_Click" />
protected void lbHope6_Click(object sender, ImageClickEventArgs e)
{
EventArgs args = new EventArgs();
if (Hope6 != null)
Hope6(this, args);
}
but when I do it this way it acts differently.. any ideas?? ive given up hope
LinkButton lb = new LinkButton();
lb.Text = s.Key.ToString();
lb.Click += new EventHandler(lbHope6_Click);
sourceNameCell.Controls.Add(lb);
protected void lbHope6_Click(object sender, EventArgs e)
{
EventArgs args = new EventArgs();
if (Hope6 != null)
Hope6(this, args);
}