MenuItem.SeparatorImageUrl Property
.NET Framework 4.5
Gets or sets the URL to an image displayed at the bottom of a menu item to separate it from other menu items.
Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Property Value
Type: System.StringThe URL to an image used to separate the current menu item from other menu items.
The following example demonstrates how to use the SeparatorImageUrl property to specify a custom image to display at the bottom of a menu item to separate it from other menu items in a Menu control.
<%@ 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>MenuItem Declarative Example</title> </head> <body> <form id="form1" runat="server"> <h3>MenuItem Declarative Example</h3> <!-- Use declarative syntax to create the --> <!-- menu structure. Create submenu items --> <!-- by nesting them within parent menu --> <!-- items. --> <asp:menu id="NavigationMenu" staticdisplaylevels="1" staticsubmenuindent="10" orientation="Vertical" target="_blank" runat="server"> <items> <asp:menuitem navigateurl="Home.aspx" text="Home" imageurl="Images\Home.gif" popoutimageurl="Images\Popout.jpg" tooltip="Home"> <asp:menuitem navigateurl="Music.aspx" text="Music" popoutimageurl="Images\Popout.jpg" tooltip="Music"> <asp:menuitem navigateurl="Classical.aspx" text="Classical" separatorimageurl="Images\Separator.jpg" tooltip="Classical"/> <asp:menuitem navigateurl="Rock.aspx" text="Rock" separatorimageurl="Images\Separator.jpg" tooltip="Rock"/> <asp:menuitem navigateurl="Jazz.aspx" text="Jazz" separatorimageurl="Images\Separator.jpg" tooltip="Jazz"/> </asp:menuitem> <asp:menuitem navigateurl="Movies.aspx" text="Movies" popoutimageurl="Images\Popout.jpg" tooltip="Movies"> <asp:menuitem navigateurl="Action.aspx" text="Action" separatorimageurl="Images\Separator.jpg" tooltip="Action"/> <asp:menuitem navigateurl="Drama.aspx" text="Drama" separatorimageurl="Images\Separator.jpg" tooltip="Drama"/> <asp:menuitem navigateurl="Musical.aspx" text="Musical" separatorimageurl="Images\Separator.jpg" tooltip="Musical"/> </asp:menuitem> </asp:menuitem> </items> </asp:menu> </form> </body> </html>
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.