O'Reilly logo

Applied ASP.NET 4 in Context by Adam Freeman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the Navigation Controls

One of the sections of the Toolbox is called Navigation. It contains a set of three controls that can be used to help a user navigate around an application. We'll look at how to use each of these controls in this section.

Using the Menu Control

The Menu control is used to create JavaScript-powered menus. Listing 15-20 shows how to use this control in markup.

Listing 15-20. Using the Web Forms Menu control

... <asp:Menu ID="Menu1" runat="server" onmenuitemclick="Menu1_MenuItemClick"> <Items> <asp:MenuItem Text="First Menu Item"> <asp:MenuItem Text="Inner Item 1" /> <asp:MenuItem Text="Inner Item 2" /> </asp:MenuItem> <asp:MenuItem Text="Second Menu Item"/> <asp:MenuItem Text="Third Menu Item"> <asp:MenuItem Text="Inner ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required