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