MenuItem.NavigateUrl Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets or sets the URL to navigate to when the menu item is clicked.

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

member NavigateUrl : string with get, set

Property Value

Type: System.String

The URL to navigate to when the menu item is clicked. The default value is an empty string (""), which indicates that this property is not set.

A menu item can be in one of two modes: selection mode or navigation mode. By default, a menu item is in selection mode. To put a menu item into navigation mode, set the menu item's NavigateUrl property to a value other than an empty string ("").

When a menu item is in navigation mode, all selection events are disabled for that menu item. Clicking the menu item in navigation mode takes the user to the specified URL. You can optionally set the Target property to specify the window or frame in which to display the linked content.

The following example demonstrates how to use the NavigateUrl property to specify the URL to navigate to when the user clicks a menu item.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top