mgmhicks
asked on
Why can't I find the node
I have a need to change the navigate URL of a treenode depending on the user group. Here is the code I am using to find the node.
When I look at the locals I can see this.
treeview1.Nodes(6).ValuePa th "Carpet/Vinyl Install Dates" String
Yet the code above does not find the node. Any ideas.
thanks
Dim myNode As New TreeNode
Dim myTest As String = "Carpet/Vinyl Install Dates"
myNode = TreeView1.FindNode(Server.HtmlEncode(mytest))
myNode.NavigateUrl = "~/Inspections/frmInstallDates2.aspx"
When I look at the locals I can see this.
treeview1.Nodes(6).ValuePa
Yet the code above does not find the node. Any ideas.
thanks
Have you tried without the Server.HtmlEncode call?
ASKER
Isn't that what I am doing in the code I sent?
myNode = TreeView1.FindNode(Server. HtmlEncode (mytest))
If it helps this code is on a master page
myNode = TreeView1.FindNode(Server.
If it helps this code is on a master page
I am asking if you have removed that bit, and tried it simply as:
myNode = TreeView1.FindNode(mytest)
ASKER
i'm sorry yea, that didn't work either. Weird, cause node(6) has that valuepath
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I know you have got it working now but when you were trying to use FindNode, was PathSeparator property of the treeview set to "/"?
ASKER
yes it is set to "/"