System.Web.UI.WebControls.MenuItemBinding.NavigateUrlField Property

Gets or sets the name of the field from the data source to bind to the MenuItem.NavigateUrl property of a System.Web.UI.WebControls.MenuItem object to which the System.Web.UI.WebControls.MenuItemBinding object is applied.

Syntax

[System.ComponentModel.TypeConverter("System.Web.UI.Design.DataSourceViewSchemaConverter, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[System.ComponentModel.DefaultValue("")]
public string NavigateUrlField { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

When the System.Web.UI.WebControls.Menu control is bound to a data source, use the MenuItemBinding.NavigateUrlField property to specify the name of the field to bind to the MenuItem.NavigateUrl property of a System.Web.UI.WebControls.MenuItem object. When rendered, the MenuItem.NavigateUrl property of each menu item to which the System.Web.UI.WebControls.MenuItemBinding object is applied contains the corresponding value from the field. The user is taken to the corresponding URL when the menu item is clicked.

Note:

You can override the URL for an individual menu item by setting its MenuItem.NavigateUrl property directly.

If the data source contains multiple tables or attributes, you must first establish the binding criteria by setting the MenuItemBinding.Depth property, the MenuItemBinding.DataMember property, or both.

Instead of using this property to bind the MenuItem.NavigateUrl property of a System.Web.UI.WebControls.MenuItem object to a field, you can also bind it to a static value by setting the MenuItemBinding.NavigateUrl property. This allows you to navigate to the same URL from each menu item to which the System.Web.UI.WebControls.MenuItemBinding object is applied.

Note:

If the MenuItemBinding.NavigateUrl and MenuItemBinding.NavigateUrlField properties are both set, the MenuItemBinding.NavigateUrlField property takes precedence.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0