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 ...

Get Applied ASP.NET 4 in Context now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.