TX Text Control .NET Server

Parameters Property

Property|Introduced in 14.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

Gets or sets the field's parameters. The order and format of the strings depend on the field's format. For example a Microsoft Word MergeField has the following format: MERGEFIELD FieldName [switches]. In this case the first string of the array is the FieldName and the following strings are possible switches. The string MERGEFIELD is the type name of the field and can be obtained through the ApplicationField.TypeName property. If a field has no parameters, this array is null.

Syntax

public string[] Parameters { get; set; }

Examples

The following example inserts and configures a Word-compatible mail-merge field by using ApplicationField.Parameters.

textControl.Text = "Dear Customer";
textControl.InputPosition = new InputPosition(5);
ApplicationField applicationField = new(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer", new[] { "CustomerName" });
textControl.ApplicationFields.Add(applicationField);

applicationField.Parameters = new[] { "CustomerName" };
if (applicationField.Parameters != null)
{
    Console.WriteLine("Application Field: Parameters is available.");
}

Further Reading

  • Reporting: Merging MS Word Documents with DocVariables –