Error using ExpandALL / CollapseALL

P

Patrick.O.Ige

Hi All
i'm getting error with my TreeView Menu(I want to have a button with
ExpandALL and CollapseALL):-
I'M USING TREEVIEW WEB CONTROL POPULATING TREENODES WITH XML FILE!
Error:-
'AddressOf' operand must be the name of a method; no parentheses are needed.

I use VB.Net and i changed the C# code from:-
private void ExpandAll()
{
for(int i=0; i < yourTree.Nodes.Count; i++)
{
yourTree.Nodes.Expanded = true;
}
}
TO

Public Sub ExpandAll()
Dim i As Integer
For i = 0 To tvFamilyTree.Nodes.Count - 1 Step i + 1
tvFamilyTree.Nodes(i).Expanded = True
Next
End Sub

And called ExapndAll in page load
And on my ASP.NET page called it like this:-
<asp:Button BorderColor=#009966 Runat=server
OnClick="ExpandAll()"></asp:Button>

Can u telling me what 'm doing wrong!!
Thx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top