Hi,
I have found an interesting quirk with the TreeView, and I just want to check if there's anything I'm doing wrong.
Let's say I create a treeview on an ASPX page: e.g.
Code: Visual Basic.NET
Dim oTreeView As New EO.Web.TreeView
Panel1.Controls.Add(oTreeView)
Dim oTreeNode As New EO.Web.TreeNode
oTreeNode.Text = "New & Improved"
oTreeNode.ItemID = "1___2___New & Improved___mydesc"
oTreeNode.OnClickScript = "alert('test2');"
oTreeNode.PopulateOnDemand = False
oTreeNode.Selected = False
oTreeView.TopGroup.Nodes.Add(oTreeNode)
When the tree renders, I see the node "New & Improved" as I would expect.
Now here's the twist...
Say, for example, I create this code as a web custom control - i.e. I create a separate class something like:
Code: Visual Basic.NET
Public Class myTree
Inherits System.Web.UI.WebControls.WebControl
And within that class I write similar code to create this tree. (Assuming Panel1 exists in this control).
Then if I put an instance of the "myTree" control on the page, I am finding that the result is "New ~ Improved". That is, the ampersand is being replaced by a tilde!!
I cannot see any reason why this would happen. Hopefully you can shed some light on this.
If not, I'll have to knock together an example app to demonstrate for you.
Regards,
Dave