TX Text Control .NET Server

Update Method

Method|Introduced in 29.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

Description

Updates the content and the page numbers of the table of contents.

Syntax

public TableOfContentsCollection.AddResult Update();

Return Value

The return value specifies whether the new table of contents has successfully been updated. It can be one of the TableOfContentsCollection.AddResult values.

Examples

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

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

var result = tableOfContents.Update();
Console.WriteLine($"Update result: {result}");

Further Reading