System.Web.UI.WebControls.TreeNodeBinding.ImageUrlField Property

Gets or sets the name of the field from the data source to bind to the TreeNode.ImageUrl property of a System.Web.UI.WebControls.TreeNode object to which the System.Web.UI.WebControls.TreeNodeBinding 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 ImageUrlField { 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.ImageUrlField property to specify the name of the field to bind to the TreeNode.ImageUrl 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 image is displayed next to a node and can be in any file format (.jpg, .gif, .bmp, and so on), as long as the client browser supports the format.

Note:

You can override the image for an individual node by setting its TreeNode.ImageUrl property directly.

Instead of using this property to bind the TreeNode.ImageUrl property of a System.Web.UI.WebControls.TreeNode object to a field, you can set the TreeNode.ImageUrl property to a fixed value by setting the TreeNodeBinding.ImageUrl property.

Note:

If the data source contains multiple fields, you must first set the TreeNodeBinding.Depth or TreeNodeBinding.DataMember property, or both properties in order to bind to the appropriate field.

When displaying an image next to a node with the TreeNodeBinding.ImageUrlField property, you should also consider setting the TreeNodeBinding.ImageToolTipField property. The ToolTip text that you specify provides Assistive Technology devices with a description of the image that can be used to make the control more accessible.

The value of this property is stored in view state.

Requirements

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