Back to Devexpress

MenuItem.NavigateUrl Property

aspnet-devexpress-dot-web-dot-menuitem-30dcba63.md

latest1.9 KB
Original Source

MenuItem.NavigateUrl Property

Gets or sets an URL which defines the navigation location.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue("")]
public string NavigateUrl { get; set; }
vb
<DefaultValue("")>
Public Property NavigateUrl As String

Property Value

TypeDefaultDescription
StringString.Empty

A string value which represents an URL where the client web browser will navigate.

|

Remarks

Use the NavigateUrl property to specify an URL to which the client web browser navigates whenever the current menu item is clicked. If the NavigateUrl property is assigned, the item serves as a link. If this property is set to an empty string ( String.Empty ) no navigation is performed when clicking on the item.

Example

The following example illustrates how to use the NavigateUrlFormatString property to specify the NavigateUrl property with two parameters.

aspx
<dx:ASPxMenu ID="ASPxMenu1" runat="server" NavigateUrlFormatString="Categories.aspx?id={0}">
    <dx:MenuItem Text="Cat1" NavigateUrl="1" />
    <dx:MenuItem Text="Cat2" NavigateUrl="2" />
</dx:ASPxMenu>

See Also

Target

MenuItem Class

MenuItem Members

DevExpress.Web Namespace