‘usercontrol部分
Public Class UserControls_SearchStaffAssignControl
Inherits System.Web.UI.UserControl
‘定义
Public Shared Event myEvent(ByVal StaffCode As String)
Protected Sub btn_assign_Click(sender As Object,e As EventArgs)
’抛出
RaiseEvent myEvent(hf_AssignBy.Value)
End Sub
End Class
‘使用,使用时,继承定义的方法
’SearchStaffAssignControl为usercontrol控件的id
Private Sub aasa(staffCode As String) Handles SearchStaffAssignControl.myEvent
Dim aa As String = staffCode
End Sub
原文链接:https://www.f2er.com/vb/256577.html