System.Web.UI.WebControls.TreeNodeBinding.ImageUrl Property

Gets or sets the URL to an image that is displayed next to a node to which the System.Web.UI.WebControls.TreeNodeBinding object is applied.

Syntax

[System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))]
[System.Web.UI.UrlProperty]
[System.ComponentModel.DefaultValue("")]
public string ImageUrl { 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.ImageUrl property to specify a custom image 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 that 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 same image to each node, you can bind the TreeNode.ImageUrl property of a System.Web.UI.WebControls.TreeNode object to a field of a data source by setting the TreeNodeBinding.ImageUrlField property.

When displaying an image next to a node with the TreeNodeBinding.ImageUrl property, you should also consider setting the TreeNodeBinding.ImageToolTip 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