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"