System.Web.UI.WebControls.TreeNodeBinding.Value Property

Gets or sets a displayed value that is not displayed but is used to store any additional data about a node to which the System.Web.UI.WebControls.TreeNodeBinding 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.TreeView control is bound to a data source, use the TreeNodeBinding.Value property to specify the value to bind to the TreeNode.Value property of a System.Web.UI.WebControls.TreeNode object. This binding relationship affects all System.Web.UI.WebControls.TreeNode objects to which the System.Web.UI.WebControls.TreeNodeBinding object is applied. The TreeNode.Value property is used to supplement the TreeNode.Text property by storing any additional data associated with the node to which the System.Web.UI.WebControls.TreeNodeBinding object is applied. This value is not displayed in the control and is commonly used to store data for handling postback events.

Note:

You can selectively override the TreeNodeBinding.Value property by setting the TreeNode.Value property of each node directly.

Instead of using the TreeNodeBinding.Value property to bind the same value to each node, you can bind the TreeNode.Value property of a System.Web.UI.WebControls.TreeNode object to a field of a data source by setting the TreeNodeBinding.ValueField property.

The value of this property is stored in view state.

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