Figer's Technology Consulting | dynamic ascx user control button event handler not firing - fix

dynamic ascx user control button event handler not firing - fix

Remember to assign the control and ID and in the controls , Page_Load re-assign that ID 

 Dim ClinControl As OOClinicianRecord = Page.LoadControl("~/OO/CareTeam/OOClinicianRecord.ascx") ClinControl.ID = "OOClinRecord" newItemPanel.Controls.Add(ClinControl)

then in OOClinicianRecord.ascx.vb

Private Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
Me.ID = "OOClinRecord"
End Sub
Comments are closed