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. How to Add items from DropDown to the Exiting Main Menu

How to Add items from DropDown to the Exiting Main Menu

Scheduled Pinned Locked Moved ASP.NET
databasesalestutorial
4 Posts 3 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.
  • M Offline
    M Offline
    mrgaddam
    wrote on last edited by
    #1

    Hi. This is from Chandrakanth. Actually in my page i was added Menu. I have Binded Data through SiteMap Provider. My Menu are ADMIn ,USERS,sALES,rEPORTS. uNDER aDMIN -loGIN,RESET PASSWORD UNDER USERS -USERADD, USERMODIFY UNDER SALES - SALESREPORTADD UNDER REPORTS - REPORT1 NOW I HAVE ONE Drop Down List , TextBox And One Button. Drop Down Items are populated from Database. Drop Down Items are like -- New Menu, AddUsers,Master Records Now i want to Select Items from DropDown(Ex... AddUsers) After that i have enter Name of Menu(LIke Admin, Users,Sales,Report) this choice depending upon User. suppose i enter in the Text box like "Admin" Here after user click Add Button ... What ever i select from DropDown(AddUsers) that shold be added in the Main Menu Based on entering the Name of the Menu Name in the TextBox. Ex in the Dropdown i Have seleced --- addUsers in the Text box i have enterred --- Admin by clicking button Under Admin AddUsers Shold be add. Can any one Give me some suggestion ont this. Thnks andRegards Chandraknth

    Chandrakanth

    C D 2 Replies Last reply
    0
    • M mrgaddam

      Hi. This is from Chandrakanth. Actually in my page i was added Menu. I have Binded Data through SiteMap Provider. My Menu are ADMIn ,USERS,sALES,rEPORTS. uNDER aDMIN -loGIN,RESET PASSWORD UNDER USERS -USERADD, USERMODIFY UNDER SALES - SALESREPORTADD UNDER REPORTS - REPORT1 NOW I HAVE ONE Drop Down List , TextBox And One Button. Drop Down Items are populated from Database. Drop Down Items are like -- New Menu, AddUsers,Master Records Now i want to Select Items from DropDown(Ex... AddUsers) After that i have enter Name of Menu(LIke Admin, Users,Sales,Report) this choice depending upon User. suppose i enter in the Text box like "Admin" Here after user click Add Button ... What ever i select from DropDown(AddUsers) that shold be added in the Main Menu Based on entering the Name of the Menu Name in the TextBox. Ex in the Dropdown i Have seleced --- addUsers in the Text box i have enterred --- Admin by clicking button Under Admin AddUsers Shold be add. Can any one Give me some suggestion ont this. Thnks andRegards Chandraknth

      Chandrakanth

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Where is your menu coming from ? There's no menu built into ASP.NET AFAIK.

      Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      M 1 Reply Last reply
      0
      • M mrgaddam

        Hi. This is from Chandrakanth. Actually in my page i was added Menu. I have Binded Data through SiteMap Provider. My Menu are ADMIn ,USERS,sALES,rEPORTS. uNDER aDMIN -loGIN,RESET PASSWORD UNDER USERS -USERADD, USERMODIFY UNDER SALES - SALESREPORTADD UNDER REPORTS - REPORT1 NOW I HAVE ONE Drop Down List , TextBox And One Button. Drop Down Items are populated from Database. Drop Down Items are like -- New Menu, AddUsers,Master Records Now i want to Select Items from DropDown(Ex... AddUsers) After that i have enter Name of Menu(LIke Admin, Users,Sales,Report) this choice depending upon User. suppose i enter in the Text box like "Admin" Here after user click Add Button ... What ever i select from DropDown(AddUsers) that shold be added in the Main Menu Based on entering the Name of the Menu Name in the TextBox. Ex in the Dropdown i Have seleced --- addUsers in the Text box i have enterred --- Admin by clicking button Under Admin AddUsers Shold be add. Can any one Give me some suggestion ont this. Thnks andRegards Chandraknth

        Chandrakanth

        D Offline
        D Offline
        Declan Bright
        wrote on last edited by
        #3

        You can make changes to what appears in the menu at runtime by manipulating the nodes in the OnMenuItemDataBound event, however persisting changes to the web.sitemap file is not so easy as this file is cached and the changes will not be visible until the application restarts.

        Declan Bright www.declanbright.com

        1 Reply Last reply
        0
        • C Christian Graus

          Where is your menu coming from ? There's no menu built into ASP.NET AFAIK.

          Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          M Offline
          M Offline
          mrgaddam
          wrote on last edited by
          #4

          Hi Mr Christian Graus I have Taken Menu Control in (2.0) And My Name of the Page is Menu.aspx that coding is <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server" > <asp:Menu ID="Menu1" runat="server" Font-Names="Verdana" Font-Size="0.8em" ForeColor="White" Height="14px" Orientation="Horizontal" StaticEnableDefaultPopOutImage="False" StaticSubMenuIndent="10px" Style="clear: right; display: inline; font-weight: bold; list-style-position: outside; font-size: 15pt; float: none; text-transform: capitalize; color: purple; list-style-type: circle; text-align: justify; text-decoration: underline" Width="100%" > <%--DataSourceID="SiteMapDataSource1" --%><StaticMenuStyle BackColor="#01145a" /> <StaticMenuItemStyle Font-Size="Small" HorizontalPadding="5px" VerticalPadding="2px" Font-Bold="true" /> <DynamicHoverStyle BackColor="#cccdd5" ForeColor="#01145a" Font-Underline="true" Font-Bold="true" /> <DynamicMenuStyle BackColor="#cccdd5" BorderColor="#ff0000" Font-Bold="true" /> <StaticSelectedStyle BackColor="Fuchsia" BorderColor="Blue" ForeColor="White" Font-Bold="true" /> <DynamicSelectedStyle BackColor="Lime" BorderColor="White" Font-Bold="true" /> <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" Font-Bold="true" /> <StaticHoverStyle BackColor="#01145a" ForeColor="White" /> </asp:Menu> <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false" /> <table width="100%" > <tr> <td align="center" > <asp:DropDownList ID="ddlMenu" runat="server" Width="200px" Height="22px"> <asp:ListItem Value ="Select">--------------------Select-------------------</asp:ListItem> <asp:ListItem Value ="Sub1">Sub1</asp:ListItem> <asp:ListItem Value ="Sub1">Sub2</asp:ListItem> <asp:ListItem Value ="Sub1">Sub3</asp:ListItem> <asp:ListItem Value ="Sub1">Sub4</asp:ListItem> <asp:ListItem Value ="Sub1">Sub5</asp:ListItem> <asp:ListItem Value ="Sub1">Sub6</asp:ListItem> </asp:DropDownList> </td> </tr> <tr> <td align="center"> <asp:TextBox ID="txtMenu" runat="server" Width="180px" Height="20px"></a

          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