TX Text Control .NET Server

GetBlockNames Method

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

Description

Lists the names of all merge blocks contained in the currently loaded template.

Syntax

public string[] GetBlockNames();

Return Value

Returns a list of the blocks contained in the currently loaded template.

Examples

The following example retrieves block names from the mail merge.

string[] results = mailMerge.GetBlockNames();
foreach (string text in results)
{
    Console.WriteLine(text);
}