Text Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK 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; }Public Property Text As StringExamples
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}");
}Dim textField As TextField = New ApplicationField(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer name", New String() { "CustomerName" })
textControl.TextFields.Add(textField)
textField.Text = "Quarterly results"
If Not String.IsNullOrWhiteSpace(textField.Text) Then
Console.WriteLine($"Text: {textField.Text}")
End If