TREENODE Element | TreeNode Class

Adds a TreeNode to a ASP.NET Web Form.

Syntax

ASP <tagPrefix:TREENODE ... >

Possible Values

tagPrefix Required. The element prefix associated with the WebControls namespace (Microsoft.Web.UI.WebControls). A TagPrefix is defined using the directive.

Members Table

The following table lists the members exposed by the TreeNode object.

Attribute Property Description
CHECKBOX CheckBox Sets or retrieves a value that indicates whether to display a check box next to the nodes in a tree.
CHECKED Checked Sets or retrieves a value that indicates whether or not the node is checked.
CHILDTYPE ChildType Sets or retrieves the type of TreeNodeType to use for all descendents.
DEFAULTSTYLE DefaultStyle Sets or retrieves a value that indicates the default style for the element.
EXPANDABLE Expandable Sets or retrieves a value that indicates whether a plus-sign image displays on a node.
EXPANDED Expanded Sets or retrieves a value that indicates whether or not the node is expanded.
EXPANDEDIMAGEURL ExpandedImageUrl Sets or retrieves the URL of an image to use for expanded nodes.
HOVERSTYLE HoverStyle Sets or retrieves a value that indicates the style of the element when the user hovers the keyboard focus or mouse pointer over it.
ID ID Sets or retrieves a value that indicates the string that identifies the object.
IMAGEURL ImageUrl Sets or retrieves a value that indicates the URL of the image to be displayed on a node or toolbar item.
NAVIGATEURL NavigateUrl Sets or retrieves the URL of the page to navigate to when the user clicks a node.
NodeData Sets or retrieves a custom data System.String.
Nodes Retrieves the TreeNodeCollection of nodes in the control.
Parent Retrieves the parent object of a node.
SELECTEDIMAGEURL SelectedImageUrl Sets or retrieves the URL of an image to use for a selected node or TAB.
SELECTEDSTYLE SelectedStyle Sets or retrieves a value that indicates the style for the selected element.
TARGET Target Sets or retrieves a value that indicates the window or frame at which to target the contents.
TREENODESRC TreeNodeSrc Sets or retrieves a value that indicates the URL of an XML file, System.String, or XML data island containing TreeNode elements.
TREENODEXSLTSRC TreeNodeXsltSrc Sets or retrieves the URL to an Extensible Stylesheet Language Transformations (XSLT) file to transform TreeNode elements.
TYPE Type Sets or retrieves the name of the node type.
Method Description
Clone Creates a new object that is a copy of the current instance.
DataBind Binds the data to the TreeNode or the TreeView whether the TreeNode has been expanded or not.
FindNodeAttribute Retrieves the attribute from the first place it is defined. The attribute may be defined in the TreeNode, in the TreeNodeType, or in the TreeView.
GetNodeIndex Retrieves an x.y.z format node index System.String representing the node's position in the hierarchy.
GetNodeTypeAttribute Retrieves a value that indicates the value of the attribute of the node's TreeNodeType.
GetSiblingNodeCollection Retrieves the TreeNodeCollection containing the current TreeNode.
Remove Removes the TreeNode and any children from its parent's nodes collection.
ToString Retrieves a System.String that indicates the current object.

Class Information

Namespace Microsoft.Web.UI.WebControls

Applies To

TREEVIEW

See Also

Internet Explorer WebControls, About the TreeView WebControl