Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Menu.ScrollUpImageUrl Property

Gets or sets the URL to an image displayed in a dynamic menu to indicate that the user can scroll up for additional menu items.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)
public string ScrollUpImageUrl { get; set; }
<asp:Menu ScrollUpImageUrl="String" />

Property Value

Type: System.String
The URL to an image displayed in a dynamic menu to indicate that the user can scroll up for additional menu items. The default value is an empty string (""), which indicates that this property is not set.

This property is not supported in the .NET 4.0 rendering mode. If this property is required, you can set the menu to the .NET 3.5 rendering mode by adding the following in the page's code:

menuInstance.RenderingCompatibility = new Version(3, 5);

Use the ScrollUpImageUrl property to specify a custom image to display at the top of each dynamic menu to indicate that the user can scroll up for additional menu items.

NoteNote

If this property is not set, the internal, default image is used.

You can specify alternate text for the image by setting the ScrollUpText property.

The following code example demonstrates how to use the ScrollUpImageUrl property to display a custom image indicating that the user can scroll up in a dynamic menu for additional menu items.


<%@ 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 Example</title>
</head>
<body>
    <form id="form1" runat="server">

      <h3>Menu Example</h3>

      <asp:menu id="NavigationMenu"
        staticdisplaylevels="2"
        staticsubmenuindent="10" 
        orientation="Vertical"
        ScrollDownImageUrl="Images\ScrollDownImage.jpg"
        ScrollDownText="Down"
        ScrollUpImageUrl="Images\ScrollUpImage.jpg"
        ScrollUpText="Up" 
        runat="server">

        <dynamicmenustyle Height="50"/>

        <items>
          <asp:menuitem text="Home">
            <asp:menuitem text="Category 1">
              <asp:menuitem text="Item 1"/>
              <asp:menuitem text="Item 2"/>
              <asp:menuitem text="Item 3"/>
              <asp:menuitem text="Item 4"/>
              <asp:menuitem text="Item 5"/>
              <asp:menuitem text="Item 6"/>
              <asp:menuitem text="Item 7"/>
              <asp:menuitem text="Item 8"/>
              <asp:menuitem text="Item 9"/>
              <asp:menuitem text="Item 10"/>
            </asp:menuitem>
          </asp:menuitem>
        </items>

      </asp:menu>

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

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, 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.

Show:
© 2014 Microsoft. All rights reserved.