Jump to content

change text on treeview


joecool2005

Recommended Posts

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

  • 3 months later...

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...