System.Web.UI.WebControls.TreeView.NoExpandImageUrl Property

Gets or sets the URL to a custom image for the non-expandable node indicator.

Syntax

[System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[System.ComponentModel.DefaultValue("")]
[System.Web.UI.UrlProperty]
public string NoExpandImageUrl { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use the TreeView.NoExpandImageUrl property to specify a custom image for the non-expandable node indicator. The non-expandable node indicator image (or spacer) is displayed next to leaf nodes (in place of the expandable and collapsible node indicators) to align the leaf nodes with parent or root nodes.

When the TreeView.ShowExpandCollapse property is set to true, the System.Web.UI.WebControls.TreeView control displays a plus sign (+) or minus sign (-) or a placeholder image next to a node to indicate whether the node is expandable, collapsible, or non-expandable, respectively. You can specify custom images by first setting the TreeView.ImageSet property to TreeViewImageSet.Custom, and then setting the TreeView.NoExpandImageUrl, TreeView.ExpandImageUrl, and TreeView.CollapseImageUrl properties to the URLs of the custom images. If no images are specified, the default images are used. To hide the expansion node indicators, set the TreeView.ShowExpandCollapse property to false.

Note:

To ensure that nodes align correctly in the System.Web.UI.WebControls.TreeView control when using custom images, make sure that all the images that are specified by the TreeView.NoExpandImageUrl, TreeView.ExpandImageUrl, and TreeView.CollapseImageUrl properties have the same dimensions.

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