joecool2005 Posted August 7, 2007 Share Posted August 7, 2007 Hi,In the code below, I have created a treeview.Is it possible to change the text on the treenode with vb.netEx.: change "Bradley" to "John"Thx <asp:TreeView ID="TreeView1" ExpandDepth="1" runat="server"> <Nodes> <asp:TreeNode Text="Bradley" Value="ID-1234" /> <asp:TreeNode Text="Whitney" Value="ID-5678" /> <asp:TreeNode Text="Barbara" Value="ID-9101" /> </Nodes> </asp:TreeView> Link to comment Share on other sites More sharing options...
Nim199 Posted November 10, 2007 Share Posted November 10, 2007 I am new to asp.net, but:If you give the Treenodes IDs: <asp:treenode id="tn1" text="Bradley" Value="ID-1234" runat="server" />In you vb code: tn1.text="john"If that doesn't work, try: TreeView1.tn1.text="john"Also, I would write <Nodes></Nodes> in lower case: <nodes></nodes>Good Luck Link to comment Share on other sites More sharing options...
jesh Posted November 12, 2007 Share Posted November 12, 2007 I've never used the TreeView WebControl, but, according to MSDN, you should be able to change the text for the first Node in your Nodes list like so:C# TreeView1.Nodes[0].Text = "John"; http://msdn2.microsoft.com/en-us/library/s...ew_members.aspx Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.