I have a simple user control that contains some buttons that fire events which I want to be handled by the page using the control. I have my code setup as such:
public event EventHandler Cancel;
public event EventHandler Confirm;
public void Confirm_Click(object sender, EventArgs e)
{
if (Confirm != null)
Confirm(this, e);
}
public void Cancel_Click(object sender, EventArgs e)
{
if (Cancel != null)
Cancel(this, e);
}
but when I try to call these from the page that is using the control's page load event I don't get any of the custom events
ASPX Code
<%@ Register TagPrefix="btg" TagName="CustomControl" Src="~/Search/CustomControl.ascx" %>
<btg:CustomControl ID="btgControl" runat="server" ></btg:CustomControl>
could this be because my buttons in the user control are within an update panel?