<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TemplatedMenu2.aspx.cs" Inherits="TemplatedMenu2" %>
<!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" xml:lang="en">
<head id="Head1" runat="server">
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <title>Templated Menu</title>
    <link href="chapterStyles.css" type="text/css" rel="stylesheet"/>  
    <style type="text/css">
      .dynamicMenu
      {   
         width: 136px;
         padding: 8px 1px 1px 8px;
         background-color: #f7f2ea;               
         border: solid 1px #ccc;    
      }  
    </style>  
</head>
<body>
   <form id="form1" runat="server">
   <div id="container">
      <h1>Templated Menu Example</h1>
      <p>This example illustrates how you can set the dispay levels in a <code>Menu</code> control.</p>
    
      
      <asp:Menu id="menuPrimary" runat="server" DataSourceID="siteSource" 
        Orientation="Horizontal" StaticDisplayLevels="1"  StaticEnableDefaultPopOutImage="false"
        MaximumDynamicDisplayLevels="1">
        

         <StaticItemTemplate>
            <asp:button ID="btnItem" runat="server" 
               Text='<%# Eval("Text") %>' 
               PostBackUrl='<%# Eval("NavigateUrl") %>'

               Width="150" />
         </StaticItemTemplate>

         <DynamicMenuStyle CssClass="dynamicMenu"/> 
         
         <DynamicItemTemplate>
            <asp:hyperlink ID="imgbtnItem" runat="server" 
               NavigateUrl='<%# Eval("NavigateUrl") %>'
                
               ToolTip='<%# Eval("Text") %>' />
            <asp:hyperlink ID="lnkItem" runat="server" 
               Text='<%# Eval("Text") %>' 
               NavigateUrl='<%# Eval("NavigateUrl") %>' />
         </DynamicItemTemplate>
        
      </asp:Menu>        

      <asp:SiteMapDataSource ID="siteSource" runat="server" 
         ShowStartingNode="false"  StartingNodeUrl="Catalog.aspx"/>
   </div>
   </form>
</body>
</html>

