runat="server"
orientation="Horizontal"/"Vertical"
StaticEnableDefaultPopOutImage="false"
.aspx.cs
Single Menu
MenuItem fixmenu =new MenuItem();
fixmenu.Text = "Home";
fixmenu.NavigateUrl = "~/Sample1.aspx";
Menu1.Items.Add(fixmenu);
Parent and there child :
//PARENT1
MenuItem parentMenu = new MenuItem();
parentMenu.Text = "Parent";
parentMenu.NavigateUrl = "~/Sample.aspx";
//CHILD1
MenuItem childMenu = new MenuItem();
childMenu.Text = "Child1";
childMenu.NavigateUrl = "~/ChildMenu.aspx";
parentMenu.ChildItems.Add(childMenu);
//CHILD2
MenuItem childMenu2 = new MenuItem();
childMenu2.Text = "Child2";
childMenu2.NavigateUrl = "~/ChildMenu.aspx";
parentMenu.ChildItems.Add(childMenu2);
Menu1.Items.Add(parentMenu);
No comments:
Post a Comment