Link to home
Start Free TrialLog in
Avatar of G2intern
G2intern

asked on

asp:menu populated from asp:dropdown using ajax.net problem

I have a dropdown that when selected, chooses which sitemap to bind my menu to. This is because each sitemap has a different set of permissions using the security model.  I'm trying to use ajax.net so that when the dropdown selected index is changed, the menu populates without reloading the page. Its simple not doing it and the page refreshes every time. Anyone have experience with this?? Thanks so much


<asp:DropDownList ID="ddNavigation" AutoPostBack="true" runat="server" BackColor="White" Font-Names="verdana" Font-Size="X-Small" ForeColor="RoyalBlue" OnSelectedIndexChanged="ddNavigation_SelectedIndexChanged"
							Width="170px">
							<asp:ListItem Value="0">Home</asp:ListItem>
							<asp:ListItem>Administration</asp:ListItem>
							<asp:ListItem>Employees</asp:ListItem>
							<asp:ListItem>Requirements/Attendance</asp:ListItem>
							<asp:ListItem>Reports</asp:ListItem>
						</asp:DropDownList>
						<asp:UpdatePanel ID="UpdatePanel1" runat="server">
							<ContentTemplate>
								<asp:Menu ID="Menu1" runat="server" BackColor="RoyalBlue" Width="170px" DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="X-Small" ForeColor="White" StaticSubMenuIndent="5px" StaticDisplayLevels="2"
									Font-Underline="False" CssClass="menu">
									<DynamicHoverStyle BackColor="MidnightBlue" ForeColor="White" />
									<DynamicMenuStyle BackColor="RoyalBlue" CssClass="sublevel1" />
									<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
									<StaticHoverStyle BackColor="MidnightBlue" />
								</asp:Menu>
							</ContentTemplate>
							<Triggers>
								<asp:AsyncPostBackTrigger ControlID="ddNavigation" EventName="SelectedIndexChanged" />
							</Triggers>
						</asp:UpdatePanel>

Open in new window

Avatar of DavidTMoore
DavidTMoore
Flag of United States of America image

do you have a scriptManager control on your page?
Avatar of G2intern
G2intern

ASKER

I do have a script manager above this code, I just did not throw it in the code snippet. Sorry for that.
ASKER CERTIFIED SOLUTION
Avatar of DavidTMoore
DavidTMoore
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks so much, I watched their introduction video on the ajax.net website, and it didn't mention the web.config added sections. Thanks so much!!