TreeNode.Depth Property
.NET Framework 3.0
Gets the depth of the node.
Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
The following code example demonstrates how use the Depth property to determine the depth of a node. It initializes all nodes with a depth of one to a selected state. For this example to work correctly, you must copy the sample XML data below to a file named Newsgroup.xml.
The following code is sample XML data for the previous example.
<category name="news.microsoft.com">
<group name="microsoft.public.dotnet.framework.aspnet"/>
<group name="microsoft.public.dotnet.framework.aspnet.mobile"/>
<group name="microsoft.public.dotnet.framework.aspnet.webservices"/>
</category>
Community Additions
ADD
Show: