In my main page I created a panel with a placeholder inside and then create a modalpopup extender.
<%--UTILIZATION LEDGER PANEL--%>
<asp:Panel ID="pnlUtilLedger" runat="server" CssClass="pnlNotice" Style="width: 70%;">
<asp:PlaceHolder ID="PlaceHolderUtilLedger" runat="server"></asp:PlaceHolder>
</asp:Panel>
<asp:HiddenField ID="hidUtilLedger" runat="server" />
<cc1:ModalPopupExtender ID="modUtilLedger" runat="server" TargetControlID="hidUtilLedger"
BackgroundCssClass="modalPopupBackground" PopupControlID="pnlUtilLedger">
</cc1:ModalPopupExtender>
<%--UTILIZATION LEDGER PANEL--%>
and I added control to the placeholder.
Private Sub btnUtil_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUtil.Click
PlaceHolderUtilLedger.Controls.Add(Page.LoadControl("~/UserControls/ucUtilizationLedger.ascx"))
modUtilLedger.Show()
End Sub
and I am trying to fire event in the usercontrol and i wont work. please help how can i fire event in the usercontrol that is not register in my main page.
down below is my button event in usercontrol that is not working.
Private Sub btnPrintUtil_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnPrintUtil.Click
'EVENT NOT WORKING WHEN CLICKED.
End Sub