Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. MenuItemClick not firing on MasterPage with SiteMap

MenuItemClick not firing on MasterPage with SiteMap

Scheduled Pinned Locked Moved C#
question
10 Posts 2 Posters 5 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lsugirljte
    wrote on last edited by
    #1

    I'm trying to get some custom control on my MasterPage to happen on the click event on my menu control based on a SiteMap. It's never hitting the MenuItemClick code. Any ideas? In master page: In master page cs: protected void Menu2_MenuItemClick(Object sender, MenuEventArgs e) { lblTest.Text = e.Item.ValuePath; }

    Thanks, Jessica

    L 1 Reply Last reply
    0
    • L lsugirljte

      I'm trying to get some custom control on my MasterPage to happen on the click event on my menu control based on a SiteMap. It's never hitting the MenuItemClick code. Any ideas? In master page: In master page cs: protected void Menu2_MenuItemClick(Object sender, MenuEventArgs e) { lblTest.Text = e.Item.ValuePath; }

      Thanks, Jessica

      L Offline
      L Offline
      lsugirljte
      wrote on last edited by
      #2

      I'm trying to get some custom control on my MasterPage to happen on the click event on my menu control based on a SiteMap. It's never hitting the MenuItemClick code. Any ideas? In master page: In master page cs: protected void Menu2_MenuItemClick(Object sender, MenuEventArgs e) { lblTest.Text = e.Item.ValuePath; } Thanks, Jessica

      E 1 Reply Last reply
      0
      • L lsugirljte

        I'm trying to get some custom control on my MasterPage to happen on the click event on my menu control based on a SiteMap. It's never hitting the MenuItemClick code. Any ideas? In master page: In master page cs: protected void Menu2_MenuItemClick(Object sender, MenuEventArgs e) { lblTest.Text = e.Item.ValuePath; } Thanks, Jessica

        E Offline
        E Offline
        ednrgc
        wrote on last edited by
        #3

        The page needs to know the event exists. Check Here[^]

        L 1 Reply Last reply
        0
        • E ednrgc

          The page needs to know the event exists. Check Here[^]

          L Offline
          L Offline
          lsugirljte
          wrote on last edited by
          #4

          "the page"?? The master page? If the menu items are on the page (I don't use a SiteMap), the page fires the click event. But I have to use a SiteMap.

          Thanks, Jessica

          E 2 Replies Last reply
          0
          • L lsugirljte

            "the page"?? The master page? If the menu items are on the page (I don't use a SiteMap), the page fires the click event. But I have to use a SiteMap.

            Thanks, Jessica

            E Offline
            E Offline
            ednrgc
            wrote on last edited by
            #5

            Sorry, I should have been more clear. Each page needs to know the event exists on the master page.

            1 Reply Last reply
            0
            • L lsugirljte

              "the page"?? The master page? If the menu items are on the page (I don't use a SiteMap), the page fires the click event. But I have to use a SiteMap.

              Thanks, Jessica

              E Offline
              E Offline
              ednrgc
              wrote on last edited by
              #6

              Try this: Click Edit MenuItem Databindings. In the Menu DataBindings Editor, in the Available data bindings drop-down list, select SiteMapNode and click Add. Select TextField in the Data binding properties drop-down list and select Title from the drop-down menu. Click OK. Select the SiteMapDataSource control. In Properties, set ShowStartingNode to False.

              L 1 Reply Last reply
              0
              • L lsugirljte

                Thanks. That worked. It modified my aspx menu control by adding the databindings section.

                Thanks, Jessica

                L Offline
                L Offline
                lsugirljte
                wrote on last edited by
                #7

                Thanks. That worked. It modified my aspx menu control by adding the databindings section. Thanks, Jessica

                L 1 Reply Last reply
                0
                • E ednrgc

                  Try this: Click Edit MenuItem Databindings. In the Menu DataBindings Editor, in the Available data bindings drop-down list, select SiteMapNode and click Add. Select TextField in the Data binding properties drop-down list and select Title from the drop-down menu. Click OK. Select the SiteMapDataSource control. In Properties, set ShowStartingNode to False.

                  L Offline
                  L Offline
                  lsugirljte
                  wrote on last edited by
                  #8

                  Thanks. That worked. It modified my aspx menu control by adding the databindings section.

                  Thanks, Jessica

                  L 2 Replies Last reply
                  0
                  • L lsugirljte

                    Thanks. That worked. It modified my aspx menu control by adding the databindings section.

                    Thanks, Jessica

                    L Offline
                    L Offline
                    lsugirljte
                    wrote on last edited by
                    #9

                    (repost with code) Thanks. That worked. It modified my aspx menu control by adding the databindings section. Thanks, Jessica

                    1 Reply Last reply
                    0
                    • L lsugirljte

                      Thanks. That worked. It modified my aspx menu control by adding the databindings section. Thanks, Jessica

                      L Offline
                      L Offline
                      lsugirljte
                      wrote on last edited by
                      #10

                      Well the event fires but the redirect doesn't happen. Not much progress.:(

                      Thanks, Jessica

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups