Solved

OnMenuItemClick Event not Firing

Posted on 2013-06-22
2
2,100 Views
Last Modified: 2013-06-22
http://msdn.microsoft.com/en-us/library/16yk5dby(v=vs.100).aspx

I am following this article precisely.  The only difference is that the menu is on the master page.

I set it up on default.aspx, but the results were the same.

I the click event is not being fired.

   <asp:Menu ID="Menu1" runat="server"
            DataSourceID="SiteMapDataSource1"
            MaximumDynamicDisplayLevels="0" Orientation="Horizontal"
            OnMenuItemClick="Menu1_MenuItemClick">
            <DataBindings>
                <asp:MenuItemBinding DataMember="SiteMapNode" TextField="Title"
                    NavigateUrlField="url" NavigateUrl="~/Default.aspx" />
            </DataBindings>                  
           
        </asp:Menu>

=======

      protected void Menu1_MenuItemClick(Object sender,
          System.Web.UI.WebControls.MenuEventArgs e)
        {
            switch (e.Item.Value)  // Skips this statement in debug mode.
            {

                case "Products":
                    SiteMapDataSource2.StartingNodeUrl = "~/Site.Master?node=hardware";
                    return;
                case "Services":
                    SiteMapDataSource2.StartingNodeUrl = "~/Site.Master?node=consulting";
                    return;
                case "Support":
                    SiteMapDataSource2.StartingNodeUrl = "~/Site.Master?node=drivers";
                    return;
            }

        }

What should I change?

Thanks,
MenuNotFiring.jpg
0
Comment
Question by:Dovberman
2 Comments
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 500 total points
ID: 39268371
0
 

Author Closing Comment

by:Dovberman
ID: 39268407
Thank you
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
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 is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

828 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