Skip to main content

ASPxMenu.Orientation Property

Gets or sets the direction in which to render the menu.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.1.dll


public Orientation Orientation { get; set; }

Property Value

Type Default Description
Orientation Horizontal

One of the Orientation enumeration values.


Use the Orientation property to specify the direction in which to render the menu control.

On the client side, you can control the menu orientation using the ASPxClientMenu.GetOrientation and ASPxClientMenu.SetOrientation methods.


This sample illustrates how to keep the NavigateUrl of the item if there's a control in the ItemTemplateContainer of the ASPxMenu.

View Example

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication6._Default" %>

<%@ register Assembly="DevExpress.Web.ASPxEditors.v8.3" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dxe" %>

<%@ register Assembly="DevExpress.Web.v8.3" Namespace="DevExpress.Web.ASPxMenu" TagPrefix="dxm" %>
<%@ register Assembly="DevExpress.Web.v8.3" Namespace="DevExpress.Web.ASPxSiteMapControl"
    TagPrefix="dxsm" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="" >
<head runat="server">
    <title>Untitled Page</title>
    <form id="form1" runat="server">
        <dxm:aspxmenu ID="ASPxMenu1" runat="server" DataSourceID="ASPxSiteMapDataSource1"
            Orientation="Vertical" OnDataBound="ASPxMenu1_DataBound">
                <dxe:aspxlabel ID="ASPxLabel1" runat="server" Text='<%#Container.Item.Text %>' Width="100px" Height="20px" Cursor="pointer">
        <dxsm:aspxsitemapdatasource ID="ASPxSiteMapDataSource1" runat="server" SiteMapFileName="~/web.sitemap" />

See Also