我创建了一个自定义事件以在单击用户控件上的按钮时触发。我想在我的父 aspx 页面上捕获此事件。我已经尝试了很多方法来搜索网络,但似乎没有一个有效。有什么建议么?
'my usercontrol code behind
Public Event DButtonClick As EventHandler
Protected Sub Button7_Click(sender As Object, e As System.EventArgs) Handles Button7.Click
RaiseEvent DButtonClick(sender, e)
Response.Write("1112333022")
DeleteUser(ListBox1.SelectedItem.Value)
End Sub
'aspx code behind
Protected Sub AdminEdit1_DButtonClick(sender As Object, e As EventArgs) Handles AdminEdit1.DButtonClick
Response.Write("page")
End Sub