# ServerTextControl.TablesOfContents Property

> Gets a collection of all tables of contents in the document. The property's value is an object of the type TableOfContentsCollection.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 29.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Server.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.Server.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Server.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > ServerTextControl.TablesOfContents Property
- **355 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/servertextcontrol/tablesofcontents-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/servertextcontrol/tablesofcontents-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/servertextcontrol/tablesofcontents-property/llms-full.txt

---

### Description

Gets a collection of all tables of contents in the document. The property's value is an object of the type [TableOfContentsCollection](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontentscollection/llms-full.txt).

### Syntax

```csharp
public TableOfContentsCollection TablesOfContents { get; }
```

```vbnet
Public ReadOnly Property TablesOfContents As TableOfContentsCollection
```

### Examples

The following example iterates through the tables of contents collection and processes each table of contents.

```csharp
foreach (TableOfContents tableOfContents in textControl.TablesOfContents)
{
    tableOfContents.Name = "CustomerName";
}
```

```vbnet
For Each tableOfContents As TableOfContents In textControl.TablesOfContents
    tableOfContents.Name = "CustomerName"
Next
```

### Limitations

Read only.

Runtime only.

---

## Nearby

- **Previous:** [ServerTextControl.Tables Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/servertextcontrol/tables-property/llms-full.txt)
- **Next:** [ServerTextControl.Text Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/servertextcontrol/text-property/llms-full.txt)
