Menu style: Orientation, StaticSubMenuIndent : Menu « Asp Control « ASP.Net






Menu style: Orientation, StaticSubMenuIndent


<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Menu Samples</title>
</head>
<body>
    <form id="form1" runat="server">
   <div id="container">
      
      <asp:Menu id="menuTwo" 
                runat="server" 
                DataSourceID="siteSource1" 
                BackColor="#FFFBD6" 
                DynamicHorizontalOffset="2" 
                Font-Names="Verdana" 
                Font-Size="1em" 
                ForeColor="#990000" 
                Orientation="Horizontal" 
                StaticSubMenuIndent="10px" >
         <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
         <DynamicHoverStyle BackColor="#990000" ForeColor="White" />
         <DynamicMenuStyle BackColor="#FFFBD6" />
         <StaticSelectedStyle BackColor="#FFCC66" />
         <DynamicSelectedStyle BackColor="#FFCC66" />
         <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
         <StaticHoverStyle BackColor="#990000" ForeColor="White" />
      </asp:Menu>
      <br />
      &nbsp;
      <br />
      <br />
      <br />


      <asp:SiteMapDataSource ID="siteSource1" runat="server" 
         ShowStartingNode="false"  />
         

   </div>
   </form>
</body>
</html>

 








Related examples in the same category

1.Using the MenuItemClick event (C#)
2.Using the MenuItemClick event (VB)
3.Using custom images
4.Applying divider images to dynamic items
5.A simple use of the Menu control
6.Style menu
7.Adding a hover style to static items in the menu control
8.Adding a hover style to dynamic items in the menu control
9.Forcing the menu items to use a horizontal orientation
10.Menu with CSS style
11.Menu control
12.Data Binding with Menu Control
13.Menu style