Creating custom TreeView/TreeNode
问题 I need to extend the TreeNode class such that I can add custom properties to each node (seeing as WebForms TreeNode doesn't include the Tag property). So this is my CustomTreeNode: public class CustomTreeNode : TreeNode { public CustomTreeNode() { } public CustomTreeNode(int nodeId, string nodeType) { NodeId = nodeId; NodeType = nodeType; } public string NodeType { get; set; } public int NodeId { get; set; } } If I create a CustomTreeNode and add it to a TreeView: CustomTreeNode node = new