I am loading a usercontrol in code-behind as show below
Dim AdjFormctl As UserControl = CType(LoadControl("~/Controls/AdjForm.ascx"), UserControl)
Dim EMPFormType As Type = AdjFormctl.GetType()
Dim EMPPK As PropertyInfo = ABCFormType.GetProperty("employeePK")
AdjFormctl.ID = "ucAdjForm"
EMPPK.SetValue(AdjFormctl, Convert.ToInt32(txtEMPPK.Text), Nothing)
phSettlement.Controls.Add(AdjFormctl)
though it is loading properly. When I hit the submit button that is in the usercontrol it is not going inside the buttonclick event and wiping out the usercontrol from the page.
Please help