System.Web.UI.WebControls.TreeNode.ToggleExpandState Method

Alternates between the expanded and collapsed state of the node.

Syntax

public void ToggleExpandState ()

Remarks

Use the TreeNode.ToggleExpandState method to alternate between an expanded and a collapsed state for the node. For example, if the node is collapsed, calling the TreeNode.ToggleExpandState method expands the node, and vice versa.

Note:

As an alternative, you can set the TreeNode.Expanded property directly.

Requirements

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