用递归做
Private Sub Cpoint(ByVal CNode As Microsoft.Web.UI.WebControls.TreeNode)
Dim cp As Short
Dim j As Short
cp = CNode.Nodes.Count
If cp = 0 and CNode.Text="aaa" Then
response.write(CNode.Text)
Else
For j = 0 To cp - 1
Call Cpoint(CNode.Nodes(j))
Next
End If
End Sub
to: justdoit006(我的心太乱
我这样:
Dim trnSelected As New Microsoft.Web.UI.WebControls.TreeNode()
trnSelected = tvwGroup.GetNodeFromIndex(tvwGroup.SelectedNodeIndex)
If trnSelected.Checked = True Then
Me.TextBox1.Text = trnSelected.Text
End If
如果选中根结点,则显示“Group”
如果没选中根结点,选中其他子结点的话,则什么也不显示。