# Overview

It is not always possible to provide all properties that might be needed for a given scenario. The **RadTreeNode** object provides a special collection called **Attributes** that can store any number of name and value pairs.

> caution The custom attribute's name should not be an **HTML reserved word**. Please see [this article](https://www.telerik.com/products/aspnet-ajax/documentation/controls/treeview/troubleshooting/custom-attributes)for more information.

* [Attributes can be defined declaratively](https://www.telerik.com/products/aspnet-ajax/documentation/controls/treeview/custom-attributes/using-custom-attributes-declaratively) by simply adding HTML attributes to a **RadTreeNode** tag.

* To add an attribute at runtime on the server, use the **Add()** method of the **RadTreeNode** **Attributes** object passing a key string and a value string.

```C#
RadTreeNode root1 = new RadTreeNode("root1");
root1.Attributes.Add("My Key", "My Value");
RadTreeView1.Nodes.Add(root1);
```

```VB.NET
Dim root1 As New RadTreeNode("root1")
root1.Attributes.Add("My Key", "My Value")
RadTreeView1.Nodes.Add(root1)
```

* [Attributes can be accessed in server-side code](https://www.telerik.com/products/aspnet-ajax/documentation/controls/treeview/custom-attributes/using-custom-attributes-at-the-server) by addressing the **RadTreeNode** **Attributes** collection.

* [Attributes can be accessed in client-side code](https://www.telerik.com/products/aspnet-ajax/documentation/controls/treeview/custom-attributes/using-custom-attributes-at-the-client) using the **getAttributes()** function. See also the [Custom Attributes online demo](https://demos.telerik.com/aspnet-ajax/TreeView/Examples/ApplicationScenarios/CustomAttributes/DefaultCS.aspx) for another example.

* [Attributes can be used to locate nodes](https://www.telerik.com/products/aspnet-ajax/documentation/controls/treeview/server-side-programming/finding-nodes-at-runtime) using the RadTreeView's or RadTreeView\.Nodes's **FindNodeByAttribute()** method. Also see the [Tutorial: Finding Nodes](https://www.telerik.com/products/aspnet-ajax/documentation/controls/treeview/server-side-programming/tutorial-on-finding-nodes) topic.

## See Also

* [Custom Attributes](https://www.telerik.com/products/aspnet-ajax/documentation/controls/treeview/troubleshooting/custom-attributes)
