asp.net.ph

Skip Navigation Links

Menu Control Syntax

ASP.NET Syntax   ASP.NET Syntax for Web Controls


Displays a menu in a Web Forms page.

Declarative Syntax

For information on the individual members of this class, see Menu in the class library.

Remarks

The Menu control renders a menu in a Web Forms page and is often used in combination with a SiteMapDataSource control for navigating a Web site.

Syntax Example

The following example demonstrates how to use declarative syntax to create a Menu control bound to a SiteMapDataSource.

<asp:menu id="myMenu" runat="server"
   datasourceid="siteMap"
   font-size=9pt
   staticdisplaylevels=2>

   <dynamicmenustyle
      backcolor = "ghostwhite"
      horizontalpadding=10
      verticalpadding=5
      borderstyle = "outset"
      borderwidth=1 />

   <dynamicmenuitemstyle
      itemspacing=1.5 />

   <dynamichoverstyle backcolor = "khaki" />

</asp:menu>

<asp:sitemapdatasource id="siteMap" runat="server" />

 Show me 

See Also

Menu Class   Menu Web Server Control


Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph.

If you have any question, comment or suggestion,
please send us a note