Export (0) Print
Expand All

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)

public:
property String^ NavigateUrl {
	String^ get ();
	void set (String^ value);
}

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.6, 4.5, 4, 3.5, 3.0, 2.0
Show:
© 2015 Microsoft