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. Web Development
  3. ASP.NET
  4. MenuItem in .NET

MenuItem in .NET

Scheduled Pinned Locked Moved ASP.NET
csharpdata-structureshelpquestion
3 Posts 2 Posters 0 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.
  • E Offline
    E Offline
    evlxtc
    wrote on last edited by
    #1

    I have a problem. If I have a submenu item in a menu tree and it is not in the FIRST parent menu then it does not work BUT if I add this to the first menu it works in the first as well as any other menuitem I add this submenu too? ANY ideas? I have a sub running to pickup a onmouseclick on the menuitems. Sub onclick() Does something Menuitem1 Submenu item1 Submenu item2 Submenu item3 Menuitem2 Submenu item4 Submenu item5 Submenu item 1,2,3 works fine and on a mouse click on them the sub runs, but 4,5 does not do anyhting. IF I now do the following. Menuitem1 Submenu item1 Submenu item2 Submenu item3 Submenu item4 Menuitem2 Submenu item4 Submenu item5 THEN Submenu item 4 works fine in both the Menuitem1 as well as Menuitem2 parents. Both works. I do not WANT Submenu item4 under Menuitem1 but if I do not have it there it does not work. ANY ideas? Here is the almost full page code. I had to ADD all the submenues to my first parent manu jsut to get it to work, but if I take them out none of the other parent manues submenues work at all. ---------------------------------------------------------------------------------------------- <%@ Page Language="VB" %> Sub NavigationMenu_MenuItemClick(ByVal sender As Object, ByVal e As MenuEventArgs) Dim MessageTransfer = e.Item.Value 'MsgBox(e.Item.Value) 'message.text = MessageTransfer Response.Write("<input type='hidden' id='TestString' value=" & MessageTransfer & ">") End Sub

    M 1 Reply Last reply
    0
    • E evlxtc

      I have a problem. If I have a submenu item in a menu tree and it is not in the FIRST parent menu then it does not work BUT if I add this to the first menu it works in the first as well as any other menuitem I add this submenu too? ANY ideas? I have a sub running to pickup a onmouseclick on the menuitems. Sub onclick() Does something Menuitem1 Submenu item1 Submenu item2 Submenu item3 Menuitem2 Submenu item4 Submenu item5 Submenu item 1,2,3 works fine and on a mouse click on them the sub runs, but 4,5 does not do anyhting. IF I now do the following. Menuitem1 Submenu item1 Submenu item2 Submenu item3 Submenu item4 Menuitem2 Submenu item4 Submenu item5 THEN Submenu item 4 works fine in both the Menuitem1 as well as Menuitem2 parents. Both works. I do not WANT Submenu item4 under Menuitem1 but if I do not have it there it does not work. ANY ideas? Here is the almost full page code. I had to ADD all the submenues to my first parent manu jsut to get it to work, but if I take them out none of the other parent manues submenues work at all. ---------------------------------------------------------------------------------------------- <%@ Page Language="VB" %> Sub NavigationMenu_MenuItemClick(ByVal sender As Object, ByVal e As MenuEventArgs) Dim MessageTransfer = e.Item.Value 'MsgBox(e.Item.Value) 'message.text = MessageTransfer Response.Write("<input type='hidden' id='TestString' value=" & MessageTransfer & ">") End Sub

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      How do you attach the onclick client function to the treenode? Are you sure that the method is attached to the nodes that are not working as you said?

      E 1 Reply Last reply
      0
      • M minhpc_bk

        How do you attach the onclick client function to the treenode? Are you sure that the method is attached to the nodes that are not working as you said?

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

        I found the problem. My parents that does have children has all got values of "" and this does not work. Each parent and child need to have a unique value it seems. I set each parent with a unique value from 1 - 10 and simple check to see if the value from the selected menuitem is NOT a numeric value between 1 - 10 and if not then do the iframe src change. I did not know that the parents values should be unique and should have values. Thanks in any case. I am just glad it is working now. Must say took me ages to figure this out as I could find no help in telling me that this should be. :)

        this is me

        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