I have a asp:Menu object that dynamically builds a dropdown style menu from a web.sitemap file. The menu works fine until a partial postback is fired from within an UpdatePanel.
After the postback, the dropdown feature no longer works (the html code for the objects is still visible when you inspect the page). The first level items are still clickable, but those with subitems do not expand like they should.
I found these older posts with the same issue, but they don't really have solutions.
ASP.Net submenu not show after postback
asp menu not working after partial postback
How do I get my menus working again after a partial postback?
Site.Master
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<asp:Menu ID="NavMenu" StaticMenuStyle-CssClass="nav navbar-nav" DynamicMenuStyle-CssClass="dropdown-menu" runat="server"
EnableViewState="false" RenderingMode="List"
StaticEnableDefaultPopOutImage="false"
IncludeStyleBlock="false" Orientation="Horizontal"
DataSourceID="SiteMapDataSource1" OnMenuItemDataBound="NavMenu_MenuItemDataBound" ></asp:Menu>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false" />
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="navbar-text">Welcome <asp:label runat="server" id="FullName">User</asp:label></li>
<li><asp:Button ID="LogoutBtn" runat="server" OnClick="btnLogout_Click" CssClass="Logout-button" Text="Logout" /></li>
</ul>
</div>
Any page with an update panel
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:ListBox ID="ListBox1" runat="server" Rows="15" SelectionMode="Single" OnSelectedIndexChanged="SelectedIndexChanged" AutoPostBack="true"></asp:ListBox>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>