System.Web.UI.WebControls.MenuItemBinding.Value Property

Gets or sets a nondisplayed value used to store any additional data about a menu item to which the System.Web.UI.WebControls.MenuItemBinding object is applied, such as data used for handling postback events.

Syntax

[System.ComponentModel.Localizable(true)]
[System.ComponentModel.DefaultValue("")]
public string Value { 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.Value property to specify the value to bind to the MenuItem.Value property of a System.Web.UI.WebControls.MenuItem object. This value is shared with all menu items to which the System.Web.UI.WebControls.MenuItemBinding object is applied. The specified value is not displayed in a menu item and is used to store any additional data about a menu item to which the System.Web.UI.WebControls.MenuItemBinding object is applied, such as data used for handling postback events.

Note:

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

Instead of using this property to specify the same value for each menu item, you can also bind the MenuItem.Value property of a System.Web.UI.WebControls.MenuItem object to a field of a data source by setting the MenuItemBinding.ValueField property. When rendered, the MenuItem.Value property of each menu item to which the System.Web.UI.WebControls.MenuItemBinding object is applied contains the corresponding value from the field.

Note:

If the MenuItemBinding.Value and MenuItemBinding.ValueField properties are both set, the MenuItemBinding.ValueField property takes precedence.

The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see System.ComponentModel.LocalizableAttribute and ASP.NET Globalization and Localization.

Requirements

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