Solved

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

Posted on 2007-11-20
4
933 Views
Last Modified: 2013-11-26
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

0
Comment
Question by:G2intern
  • 2
  • 2
4 Comments
 
LVL 4

Expert Comment

by:DavidTMoore
ID: 20319922
do you have a scriptManager control on your page?
0
 

Author Comment

by:G2intern
ID: 20319931
I do have a script manager above this code, I just did not throw it in the code snippet. Sorry for that.
0
 
LVL 4

Accepted Solution

by:
DavidTMoore earned 500 total points
ID: 20320037
As far as I can tell that code looks fine, my next guess would be that it has something to do with your web.config file.  Did you take make all the updates to your web.config when you began using ajax?

this information can be found here:
http://asp.net/ajax/documentation/live/ConfiguringASPNETAJAX.aspx

hope this helps

cheers
~David
0
 

Author Closing Comment

by:G2intern
ID: 31410121
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!!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now