Anyone have examples of the MenuClass in 2.0?

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
 
M

Mark Rae

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);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,444
Messages
2,571,708
Members
48,796
Latest member
Greg L.
Top