Set SeparatorImageUrl : MenuItem « Asp Control « ASP.Net






Set SeparatorImageUrl


<%@ 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>Test Menu</title>
</head>
<body>
    <form id="form1" runat="server">
    <div id="container">
      <asp:Menu id="menuMain" runat="server">               
        <Items>
          <asp:MenuItem Text="Home" NavigateUrl="home.aspx" 
                ImageUrl="images/menuHome.gif" 
                SeparatorImageUrl="images/separator.gif" 
                ToolTip="Click to return to home page" />
          <asp:MenuItem Text="Catalog" PopOutImageUrl="images/menuPopout.gif" 
                ImageUrl="images/menuCatalog.gif" 
                SeparatorImageUrl="images/separator.gif">
          <asp:MenuItem Text="Categories" NavigateUrl="categories.aspx" 
                SeparatorImageUrl="images/separator.gif"
                ToolTip="View our books by category" />
          <asp:MenuItem Text="Series" NavigateUrl="series.aspx" 
                ToolTip="View our books by series"/>
          </asp:MenuItem>
          <asp:MenuItem Text="About Us" NavigateUrl="about.aspx" 
                ImageUrl="images/menuABout.gif"
                ToolTip="Our history and contact info" />
        </Items> 
      </asp:Menu>

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

 








Related examples in the same category

1.Programmatic MenuItems
2.Standard Example Menu