I have an ascx control that I am loading it on masterpage's Page_Load(), in my ascx control I have my asp UpdatePanel.
Loading ascx in master page:
protected void Page_Load(object sender, EventArgs e)
{
usercontrols.mainmenu adminmenu = (usercontrols.mainmenu)LoadControl("~/mymenupath.ascx");
//phmainmanu is a placeholder in masterpage
phmainmanu.Controls.Add(adminmenu);
}
the issue is this: if I load the usercontrol this way my UpdatePanel that is inside the masterpage is not working, but if I add register tag in my masterpage as bellow code and import the ascx that way UpdatePanel works normal.
<%@ Register Src="~/admin/usercontrols/contentexplorer.ascx" TagName="Tree" TagPrefix="NAV" %>
<NAV:Tree ID="treenav" runat="server" />
I assume I might need to load the control in different page life cycle event, I did try Page_Init but did not work, please help.