This documentation is archived and is not being maintained.

MenuItem.NavigateUrl Property

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

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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