Anyone have examples of the MenuClass in 2.0?

  • Thread starter Thread starter JackBlack
  • Start date Start date
J

JackBlack

Hi, all! Does anyone happen to have a functioning example of
programmatically building a Menu using the Menu Class under 2.0? I'm having
a dickens of a time getting it working...

Any suggestions welcome! Thanks!
Jack
 
Hi, all! Does anyone happen to have a functioning example of
programmatically building a Menu using the Menu Class under 2.0? I'm
having a dickens of a time getting it working...

Any suggestions welcome! Thanks!

<asp:Menu ID="mnuTop" runat="server" Orientation="Horizontal">
<StaticMenuItemStyle ForeColor="#18B7CC" HorizontalPadding="15px" />
<StaticHoverStyle ForeColor="White" />
<Items />
</asp:Menu>

MenuItem objMenuItem = null;
objMenuItem = new MenuItem();
objMenuItem.Text = "Home";
objMenuItem.NavigateUrl = "../home/default.aspx";
mnuTop.Items.Add(objMenuItem);
 
Back
Top