Articles in this section
Category / Section

Using HTML tags in the Node's text of TreeView in ASP.NET WebForms?

1 min read

 

Yes. You can use TreeViewNode.IsTextHtml property to use html tags in the Node Text.

C#

//Get the node instance

TreeViewNode node = TreeView1.FindNode("Node");

node.IsTextHtml = true;

node.Text = "<b style=''''color: blue''''>Font";

VB

''Get the node instance

Dim node As TreeViewNode = TreeView1.FindNode("Node")

node.IsTextHtml = True

node.Text = "<b style=''''color: blue''''>Font"

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied