asp.net - Load bottom horizontal menu based on choice in first -


I have a horizontal menu in the div and I want to load it down a menu (also horizontal) based on what Users choose in the top menu.

Right now I am providing a menu in a master page, on which the content page is currently loaded. However, I do not know how the submenu option was selected when a user clicks on them.

What is the best way to manage stacked horizontal menus in ASP.NET?

will show a main menu with 'A' and 'B', show a sub menu with 'A-1' / ''. Displays' Div 'A-2' or 'B-1' / 'B-2' and a label that the sub menu item is selected. What does this mean?

  & lt; Div> Main menu: & lt; Asp: menu id = "menu1" runat = "server" orientation = "horizontal"> & gt; Items> & lt; Asp: MenuItem text = "A"> & lt; Asp: MenuItem text = "B"> & lt; / Item> & lt; / Asp: Menu> & lt; / Div> & lt; Div> sub menu: & lt; ASP: Menu id = "Menu2" runat = "server" Orientation = "horizontal"> & lt; / Asp: Menu> & lt; / Div> & lt; Div> Selected sub menu items: & lt; Asp: label id = "lbl1" runat = "server"> & lt; / Div> Secure Zero Page_Init (Object Sender, EventArgs e) {menu1.MenuItemClick + = New MenuEventHandler (menu1_MenuItemClick); Menu2.MenuItemClick + = New MenuEventHandler (menu2_MenuItemClick); } Zero Menu 1_MenuItemClick (Object Sender, MenuEventArgs e) {menu2.Items.Clear (); Menu2.Items.Add (New MenuItem (e.Item.Text + "-1");); Menu2.Items.Add (New MenuItem (e.Item.Text + "-2")); } Zero Menu 2_MenuItemClick (Object Sender, MenuEventArgs e) {lbl1.Text = e.Item.Text; }  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -