# TableOfContents.ID Property

> Gets or sets an identifier. It must be a one-based value. A value of zero indicates that the table of contents has no identifier.

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

---

### Description

Gets or sets an identifier. It must be a one-based value. A value of zero indicates that the table of contents has no identifier.

### Syntax

```csharp
public int ID { get; set; }
```

```vbnet
Public Property ID As Integer
```

### Examples

The following example creates a table of contents for the document's heading styles by using `TableOfContents.ID`.

```csharp
TableOfContents tableOfContents = new(1, 3) { Name = "Contents", ID = 10 };
textControl.TablesOfContents.Add(tableOfContents);

tableOfContents.ID = 100;
Console.WriteLine($"ID used by Table Of Contents: {tableOfContents.ID}");
```

```vbnet
Dim tableOfContents As New TableOfContents(1, 3) With { .Name = "Contents", .ID = 10 }
textControl.TablesOfContents.Add(tableOfContents)

tableOfContents.ID = 100
Console.WriteLine($"ID used by Table Of Contents: {tableOfContents.ID}")
```

---

## Nearby

- **Previous:** [TableOfContents.HighlightMode Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontents/highlightmode-property/llms-full.txt)
- **Next:** [TableOfContents.Length Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontents/length-property/llms-full.txt)
