The OnEvent1 part should be there automatically if you declared the event right...
See this sample...
Control code:
public partial class WebUserControl1 : System.Web.UI.UserControl
{
public event EventHandler TextUpdated;
public string Text
{
get
{
return ( TextBox1.Text );
}
}
protected void TextBox1_TextChanged ( object sender, EventArgs e )
{
if ( TextUpdated != null )
{
TextUpdated( this, EventArgs.Empty );
}
}
}
Page markup:
<%@ Register Src="~/WebUserControl1.ascx" TagPrefix="Control" TagName="WebUserControl1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<Control:WebUserControl1 runat="server" OnTextUpdated="Unnamed_TextUpdated" />
</div>
</form>
</body>
</html>
The important parts are in bold!