Tuesday, December 30, 2008

How To Add Menu Dynamically

protected void Page_Load(object sender,  EventArgs e)
{

Menu
myMenu = new Menu();
this.form1.Controls.Add(myMenu);
MenuItem mnItem = new MenuItem("test");
myMenu.Items.Add(mnItem);
myMenu.Orientation =
Orientation.Horizontal;
//myMenu .Orientation = Orientation.Vertical;
}

No comments: