Solved

OnMenuItemClick Event not Firing

Posted on 2013-06-22
2
2,037 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

759 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

19 Experts available now in Live!

Get 1:1 Help Now