TX Text Control .NET Server

Text Property

Property
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

Returns or sets the text which is contained within a text field. This property is not supported for the DocumentTarget class.

Syntax

public string Text { get; set; }

Examples

The following example inserts a Word-compatible text field into a template by using TextField.Text.

TextField textField = new ApplicationField(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer name", new[] { "CustomerName" });
textControl.TextFields.Add(textField);

textField.Text = "Quarterly results";
if (!string.IsNullOrWhiteSpace(textField.Text))
{
    Console.WriteLine($"Text: {textField.Text}");
}

Further Reading

  • Creating Pre-Completed Forms Automatically –
  • MailMerge: Merge Hyperlinks into Merge Fields –
  • Removing TextFields Completely when the User Removes Their Text –