I have a asp.net web page with place holder control and Menu control when user select an item from the menu. It will dynamically load the control based on menu item's value.
I got the control loaded but if i click on the a link button or anything on the web user control (.ascx) The web user control (.ascx) will disappear. I do not know what is causing this. Can someone take a look at my code and see what i'm missing?
Protected Sub Menu1_Click(ByVal sender As Object, ByVal e As EventArgs)
Select Case Me.Menu1.SelectedValue
Case "CustMasterMain"
Dim ccCustMasterMaint As UserControl = CType(Page.LoadControl("~/Controls/Franchise/CustMasterMaintControl.ascx"), UserControl)
Me.phHolder1.Controls.Add(ccCustMasterMaint)
Case "AcctRecInq"
Dim ccAcctRecInq As UserControl = CType(Page.LoadControl("~/Controls/Franchise/custAccountsReceivableInquiry.ascx"), UserControl)
Me.phHolder1.Controls.Add(ccAcctRecInq)
End Select
End Sub