我有这个标记 Main.ascx:
asp:Repeater ID="rptSource" runat="server">
<ItemTemplate>
<uc1:CustomControlsUC ID="CustomControlsUC1" runat="server" DataSource='<%#Container.DataItem %>' />
</ItemTemplate>
</asp:Repeater>
并在 CustomControlsUC.ascx
Public Event Entered(ByVal sender As Object, ByVal e As CommandEventArgs)
和
Public Sub CustomValidation(sender As Object, args As CommandEventArgs)
RaiseEvent Entered(Me, args)
End Sub
在我的 Main.ascx 中,转发器在哪里,我尝试处理此事件。
Protected Sub rptSource_ItemDataBound(sender As Object, e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles rptSource.ItemDataBound
Dim rpt As inc_CustomControlsUC = CType(e.Item.Controls(1), inc_CustomControlsUC)
AddHandler rpt.Entered, AddressOf HandleThis
End Sub
但是在这部分 AddHandler rpt.Entered, AddressOf HandleThis,我没有这个 Entered 事件:
我怎样才能做到这一点?