Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MenuItem.PopOutImageUrl Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets the URL to an image that is displayed in a menu item to indicate that the menu item has a dynamic submenu.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public string PopOutImageUrl { get; set; }
/** @property */
public String get_PopOutImageUrl ()

/** @property */
public void set_PopOutImageUrl (String value)

public function get PopOutImageUrl () : String

public function set PopOutImageUrl (value : String)

Property Value

The URL to an image that is displayed in a menu item to indicate that the menu item has a dynamic submenu. The default is an empty string (""), which indicates that this property is not set.

Use the PopOutImageUrl property to specify a custom image that is displayed in a menu item to indicate that the menu item has a dynamic submenu. This image can be in any file format (.jpg, .gif, .bmp, and so on), as long as the client's browser supports that format.

NoteNote

Setting this property overrides the image specified by the Menu.DynamicPopOutImageUrl and Menu.StaticPopOutImageUrl properties.

You can also disable this image in a static menu by setting this property to an empty string and the StaticEnableDefaultPopOutImage property to false. Similarly, you can disable this image in a dynamic menu by setting this property to an empty string and the DynamicEnableDefaultPopOutImage property to false.

The following code example demonstrates how to use the PopOutImageUrl property to specify a custom image to display in a menu item when the menu item has a dynamic submenu.


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

<html>
  <body>
    <form 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 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft