Why TWO bubble events from ONE click??

BreakOB1

New Member
Hi,<BR><BR>I can't work out why clicking ONCE on the button in User_Control.ascx causes TWO bubble events to fire in the parent page Main_Page.aspx (all code below).<BR><BR>Both events are reported in the main page as having the same source object (unsurprisingly, the button), but have different event arguments (the first "System.EventArgs", the second "System.Web.UI.WebControls.CommandEventArgs").<BR><BR>Can anyone tell me what on earth is going on?<BR><BR>Thanks!<BR><BR>JON<BR><BR><BR><BR><BR><BR><BR>++++++++++++++++++++++++++++++<BR> MAIN_PAGE.aspx<BR>++++++++++++++++++++++++++++++<BR><BR><BR><%@ Page Language="VB" %><BR><BR><%@ Register TagPrefix="LHS" TagName="UserControl" src=http://aspmessageboard.com/archive/index.php/"User_Control.ascx" %><BR><BR><script language="VB" runat="server"><BR> <BR>Protected Overrides Function OnBubbleEvent(obj As Object, e As EventArgs) As Boolean<BR> Context.Response.Write("Parent Control's BubbleEvent is called.")<BR> Context.Response.Write("Source of event is:" & obj.ToString())<BR> Context.Response.Write("EventArgs are:" & e.ToString())<BR> Return True<BR>End Function<BR><BR> <BR></script><BR><BR><html><BR><body><BR><form runat="server"><BR><BR> <LHS:UserControl runat="server" id="LHSUserControl" /><BR><BR></form><BR></body><BR></html><BR><BR><BR><BR><BR>++++++++++++++++++++++++++++++<BR> USER_CONTROL.ascx<BR>++++++++++++++++++++++++++++++<BR><BR><BR><BR><%@ Control Language="VB" %><BR><BR><script language="VB" runat="server"><BR><BR>Public Sub FireEvent(obj as object, e as eventargs) <BR> RaiseBubbleEvent(obj, e)<BR>End sub<BR><BR></script><BR><BR><asp:Button runat="server" Text="Add Person" OnClick="FireEvent" /><BR> <BR> <BR>
 
Back
Top