I think you must create click event in OnInit scope..
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
Page.RegisterRequiresPostBack(this);
base.CreateChildControls();
btn.Click += new System.Web.UI.ImageClickEventHandler(RaiseLeftClickEvent);
}
UPDATE:
First, base class of the control must be WebControl class.
And also OnInit scope define button's event:
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
Page.RegisterRequiresControlState(this);
Controls.Clear();
base.CreateChildControls();
btn.Click += btnImageButton_Click;
Controls.Add(btn);
}
void btnImageButton_Click(object sender, EventArgs e)
{
//Handle Click event..
}
Hope this helps..