Raising an Event within a Control Inside a Repeater

Starr Duskk
Starr Duskk used Ask the Experts™
on
I don't need a lesson on how to use an Event with a control in a control. The problem here is that the event is in a repeater in a control within the repeater:
                <asp:Repeater ID="repRows" runat="server">
                    <ItemTemplate>
                        <uc:BulkRow runat="server" ID="BulkRow" ></uc:BulkRow>
                    </ItemTemplate>
                </asp:Repeater>

Open in new window


I have a repeater in the parent control. Inside the repeater is a child control that contains all of the form elements.

When the submit button is clicked for that row in  the child form elements control, I want to raise an event to trigger something in the parent control that has the actual repeater.

However, it is not triggering my parent repeater control's event handler.

Example:
BulkControl - parent
contains repeater and defines the handler on the ItemDataBound:
 
    Dim bulkRowCtrl As BulkRow = CType(e.Item.FindControl("BulkRow"), BulkRow)
        AddHandler bulkRowCtrl.AlertEvent, AddressOf AlertEventHandler

Open in new window


BulkRow child Control contains the event:
    Public Event AlertEvent(ByVal alertMessage As String)

Open in new window

and raises the event:
               
 RaiseEvent AlertEvent(alertEventMessage)

Open in new window


When I raise the event within the child control, it never triggers it in the parent control.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial